Freeeaky / GTALua

Scripting engine for GTA V in Lua
GNU General Public License v2.0
60 stars 25 forks source link

Scripts dont work after loading save #50

Open Freeeaky opened 9 years ago

Freeeaky commented 9 years ago

Reported by Baaa, IRC

zh0ul commented 7 years ago

I've been asked about this innumerable times. Can ye provide some insight into this issue, or where to start digging?

It feels like GTALua simply loses its tick/hook, which likely means the game mem has shifted and somehow GTALua did not pick up on this fact and re-register with scripthook?

Freeeaky commented 7 years ago

What exactly happens when you load a save?

zh0ul commented 7 years ago

Repro steps:

zh0ul commented 7 years ago
zh0ul commented 7 years ago
Freeeaky commented 7 years ago

I agree, it's probably related to not using scriptUnregister properly. Try finding out when m_bActive is false.

void GTALua::UpdateLoop() { while (m_bActive) { Update(); } MessageBox(0, "m_bActive is false", 0, 0); }

for example

zh0ul commented 7 years ago
Freeeaky commented 7 years ago

That's interesting, i'll try looking into it too.