From 9fc712da019a1ca646171e912209a993e7c43976 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Fri, 25 Dec 2020 09:14:22 +0300 Subject: [PATCH] Fix checking for gag spawnflag (#143) --- dlls/monsterstate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/monsterstate.cpp b/dlls/monsterstate.cpp index cec29b79..a642873b 100644 --- a/dlls/monsterstate.cpp +++ b/dlls/monsterstate.cpp @@ -66,7 +66,7 @@ void CBaseMonster::RunAI( void ) // IDLE sound permitted in ALERT state is because monsters were silent in ALERT state. Only play IDLE sound in IDLE state // once we have sounds for that state. - if( ( m_MonsterState == MONSTERSTATE_IDLE || m_MonsterState == MONSTERSTATE_ALERT ) && RANDOM_LONG( 0, 99 ) == 0 && !( pev->flags & SF_MONSTER_GAG ) ) + if( ( m_MonsterState == MONSTERSTATE_IDLE || m_MonsterState == MONSTERSTATE_ALERT ) && RANDOM_LONG( 0, 99 ) == 0 && !( pev->spawnflags & SF_MONSTER_GAG ) ) { IdleSound(); }