File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -217,8 +217,12 @@ void CFireSA::SetNumGenerationsAllowed(char generations)
217217//
218218// Fix GH #3249 (PLAYER_ON_FIRE task is not aborted after the fire is extinguished)
219219// //////////////////////////////////////////////////////////////////////
220- static void AbortFireTask (CEntitySAInterface* entityOnFire)
220+ static void AbortFireTask (CEntitySAInterface* entityOnFire, DWORD returnAddress )
221221{
222+ // We can't and shouldn't remove the task if we're in CTaskSimplePlayerOnFire::ProcessPed. Otherwise we will crash.
223+ if (returnAddress == 0x633783 )
224+ return ;
225+
222226 auto ped = pGame->GetPools ()->GetPed (reinterpret_cast <DWORD*>(entityOnFire));
223227 if (!ped || !ped->pEntity )
224228 return ;
@@ -238,10 +242,12 @@ static void _declspec(naked) HOOK_CFire_Extinguish()
238242 _asm
239243 {
240244 mov [eax+730h], edi
245+ mov ebx, [esp+8 ]
241246
247+ push ebx
242248 push eax
243249 call AbortFireTask
244- add esp, 4
250+ add esp, 8
245251
246252 jmp CONTINUE_CFire_Extinguish
247253 }
You can’t perform that action at this time.
0 commit comments