ivanmeler / OpenVHook

Open source script hook loader implementation for Grand Theft Auto V
GNU General Public License v2.0
65 stars 35 forks source link

Pools broken #16

Open CamxxCore opened 3 years ago

CamxxCore commented 3 years ago

Commit 0259e6a094a7ea8c91fcef48e60520d1454f0b91 likely breaks pools entirely, since the previous calls already add the offset. Displacement is at +0x0, RIP is at +0x4. Can't test this now, just browsing and caught my attention. https://github.com/ivanmeler/OpenVHook/blob/1491c244d3a9c6311ffa7f83f76164de60031621/OpenVHook/Scripting/Pools.cpp#L16

DKingAlpha commented 3 years ago

thx for the review. reverted 0259e6a at ac94d35858482791764732f12637b0e7c8c3ce5d.

Some pools are working now. A few others are causing native functions throwing exceptions. I am working on that.

Guess there could be a stack check. Will try to migrate the caller to the game mem region.

EDIT: ScriptHookV has simple working pools. It's not the game detection, just our implementation broken.

DKingAlpha commented 3 years ago

fix pools API. still broken on a few entities