Skip to content

Commit 6862921

Browse files
committed
Fix crash in CAEAmbienceTrackManager::CheckForPause hook
1 parent 6526361 commit 6862921

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Client/game_sa/CAudioEngineSA.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,14 +425,14 @@ static void __declspec(naked) HOOK_CAEAmbienceTrackManager_CheckForPause()
425425

426426
__asm
427427
{
428-
push esi
428+
pushad
429429
call IsAmbientSoundGeneralEnabled
430430
test al, al
431+
popad
431432
jnz continueWithOriginalCode
432433
mov dword ptr [esp+8], 0 // Pause by setting 0.0f for the last argument to CAEAudioHardware::SetChannelFrequencyScalingFactor
433434

434435
continueWithOriginalCode:
435-
pop esi
436436
mov edi, [esp+8]
437437
xor ecx, ecx
438438
jmp RETURN_CAEAmbienceTrackManager_CheckForPause

0 commit comments

Comments
 (0)