-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FLHook core update #352
base: master
Are you sure you want to change the base?
FLHook core update #352
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,9 +216,10 @@ HK_ERROR HkResolveShortCut(const wstring &wscShortcut, uint &_iClientID) | |
|
||
uint HkGetClientIDByShip(uint iShip) | ||
{ | ||
const CShip* cobj = reinterpret_cast<CShip*>(CObject::Find(iShip, CObject::CSHIP_OBJECT)); | ||
CShip* cobj = reinterpret_cast<CShip*>(CObject::Find(iShip, CObject::CSHIP_OBJECT)); | ||
if (cobj) | ||
{ | ||
cobj->Release(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be called after we've got the result of GetOwnerPlayer and have actually stopped using the |
||
return cobj->GetOwnerPlayer(); | ||
} | ||
return 0; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -305,6 +305,11 @@ bool InitHookExports() | |
ReadProcMem(pAddress, szRepFreeFixOld, 5); | ||
WriteProcMem(pAddress, szNOPs, 5); | ||
|
||
// jump past a redundant XOR statement | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. uh, what? |
||
pAddress = SRV_ADDR(0x61D6); | ||
char szJumpXor[1] = { '\x0D' }; | ||
WriteProcMem(pAddress, szJumpXor, sizeof(szJumpXor)); | ||
|
||
// patch pub::Save method | ||
pAddress = SRV_ADDR(0x7EFA8); | ||
char szNop[2] = { '\x90', '\x90' }; | ||
|
@@ -318,6 +323,11 @@ bool InitHookExports() | |
|
||
WriteProcMem(pAddress, szDivertJump, 1); | ||
|
||
// jump out of the crash trap in TradeLane/SPObjUpdate related code | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are these tricks of our own or things we've gotten from adoxa/tsp friends? |
||
pAddress = (char*)hModCommon + 0xF24A0; | ||
char szSkipCrash[2] = { '\xEB', '\x28' }; | ||
WriteProcMem(pAddress, szSkipCrash, 2); | ||
|
||
// install hook at new address | ||
pAddress = SRV_ADDR(0x78B39); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this intentional?