File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -4016,21 +4016,25 @@ static void __declspec(naked) HOOK_ComputeDamageResponse_StartChoking()
40164016
40174017 __asm
40184018 {
4019- pushad
4020- mov al, [esp+0x8C ]
4019+ // Get weapon type before pushad to avoid stack offset corruption
4020+ mov al, [esp+0x8 ]
40214021 mov ucChokingWeaponType, al
4022+
4023+ pushad
40224024
40234025 mov ebx, [m_pChokingHandler]
40244026 test ebx, ebx
40254027 jz continueWithOriginalCode
40264028
4029+ // Push weapon type as parameter
4030+ movzx eax, ucChokingWeaponType
40274031 push eax
40284032 call ebx
40294033 add esp, 4
40304034 test al, al
4031- popad
40324035
40334036 jnz continueWithOriginalCode
4037+ popad
40344038 jmp dwChokingDontchoke
40354039
40364040 continueWithOriginalCode:
You can’t perform that action at this time.
0 commit comments