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)
217
217
//
218
218
// Fix GH #3249 (PLAYER_ON_FIRE task is not aborted after the fire is extinguished)
219
219
// //////////////////////////////////////////////////////////////////////
220
- static void AbortFireTask (CEntitySAInterface* entityOnFire)
220
+ static void AbortFireTask (CEntitySAInterface* entityOnFire, DWORD returnAddress )
221
221
{
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
+
222
226
auto ped = pGame->GetPools ()->GetPed (reinterpret_cast <DWORD*>(entityOnFire));
223
227
if (!ped || !ped->pEntity )
224
228
return ;
@@ -238,10 +242,12 @@ static void _declspec(naked) HOOK_CFire_Extinguish()
238
242
_asm
239
243
{
240
244
mov [eax+730h], edi
245
+ mov ebx, [esp+8 ]
241
246
247
+ push ebx
242
248
push eax
243
249
call AbortFireTask
244
- add esp, 4
250
+ add esp, 8
245
251
246
252
jmp CONTINUE_CFire_Extinguish
247
253
}
You can’t perform that action at this time.
0 commit comments