szapp / GothicFreeAim

Free aiming for the video game series Gothic
https://gfa.szapp.de
MIT License
36 stars 4 forks source link

GFA crashes LeGo trialogs #177

Closed szapp closed 7 years ago

szapp commented 7 years ago

During the second(?) call of TRIA_Next in a LeGo trialog the game crashes, because "this" has no valid visual in oCNpc::EV_PlayAni(oCMsgConversation *) 0x757AB0. This crash only happens with GFA_RANGED initialized and has only popped up recently.

Most likely, it is thus connected to the bounding box enlargement.

szapp commented 7 years ago

Similarly as the frame functions bug, this has to do with overwriting the variables of the backed up registers during a hook the calls another hooked function (see LeGo frame functions bug fix). There is no point, however, to do the same with every hook of LeGo (oCNPC::EV_PlayAni in this case), but instead the registers should be backed up on some sort of stack structure instead of overwriting their previous value.

szapp commented 7 years ago

Preliminary fix for LeGo hooks is written, but needs to be tested thoroughly first, i.e. this bug will be fixed in LeGo, not here.