Skip to content

Commit 515789c

Browse files
Synchronize changes from 1.6 master branch [ci skip]
f474b4d Correction for crash fix #3562 (#3595)
2 parents daf6201 + f474b4d commit 515789c

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Client/multiplayer_sa/CMultiplayerSA_CrashFixHacks.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,26 +2070,22 @@ static void _declspec(naked) HOOK_FxPrim_c__Enable()
20702070
////////////////////////////////////////////////////////////////////////
20712071
#define HOOKPOS_CFire_ProcessFire 0x53A6FC
20722072
#define HOOKSIZE_CFire_ProcessFire 9
2073-
static DWORD CONTINUE_CFire_ProcessFire = 0x53A705;
2073+
static constexpr DWORD CONTINUE_CFire_ProcessFire = 0x53A705;
2074+
static constexpr DWORD SKIP_CFire_ProcessFire = 0x53A69C;
20742075
static void _declspec(naked) HOOK_CFire_ProcessFire()
20752076
{
20762077
_asm
20772078
{
2078-
test byte ptr [esi], 4
2079-
// If the beingExtinguished flag has been set, we skip processing this fire instance
2080-
jnz skip
2079+
test byte ptr [esi], 1 // If the "active" flag has been set to 0, we skip processing attached entities
2080+
jz skip
20812081

20822082
mov ecx, [esi+10h]
20832083
mov eax, [ecx+590h]
20842084
jmp CONTINUE_CFire_ProcessFire
20852085

20862086
skip:
2087-
pop edi
2088-
pop esi
2089-
pop ebp
2090-
pop ebx
2091-
add esp, 2Ch
2092-
retn
2087+
mov ecx, esi
2088+
jmp SKIP_CFire_ProcessFire
20932089
}
20942090
}
20952091

0 commit comments

Comments
 (0)