From 51c4ce73396302a6db8279a74e9b366ad21c4f07 Mon Sep 17 00:00:00 2001 From: RedSprend Date: Sun, 1 Dec 2024 00:04:48 +0100 Subject: [PATCH] Fix Alien Slave playing the powerup effect again after the attack --- dlls/monster/CISlave.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/monster/CISlave.cpp b/dlls/monster/CISlave.cpp index fd110757..f83815ad 100644 --- a/dlls/monster/CISlave.cpp +++ b/dlls/monster/CISlave.cpp @@ -375,6 +375,10 @@ void CISlave :: HandleAnimEvent( MonsterEvent_t *pEvent ) case ISLAVE_AE_ZAP_POWERUP: { + // Hack to prevent the event from playing again when the animation ends + if (m_iTaskStatus == TASKSTATUS_COMPLETE) + break; + CSoundEnt::InsertSound(bits_SOUND_COMBAT, pev->origin, NORMAL_GUN_VOLUME, 3.0); pev->framerate = gSkillData.sk_islave_speed_zap;