Change ideal monster state in MonsterUse only if monster is idle

This commit is contained in:
Roman Chistokhodov 2021-02-27 13:36:23 +03:00 committed by Andrey Akhmichin
parent 201206ccfd
commit d86b0bf480

View File

@ -571,7 +571,8 @@ void CBaseMonster::MonsterThink( void )
//========================================================= //=========================================================
void CBaseMonster::MonsterUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) void CBaseMonster::MonsterUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{ {
m_IdealMonsterState = MONSTERSTATE_ALERT; if (m_MonsterState == MONSTERSTATE_IDLE)
m_IdealMonsterState = MONSTERSTATE_ALERT;
} }
//========================================================= //=========================================================