From 447c1850790c45a865cf68b34ba028d2da50eb3c Mon Sep 17 00:00:00 2001 From: Blixibon Date: Fri, 5 Nov 2021 22:14:29 -0500 Subject: [PATCH] Fixed metrocops not moving to attack --- sp/src/game/server/hl2/npc_metropolice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sp/src/game/server/hl2/npc_metropolice.cpp b/sp/src/game/server/hl2/npc_metropolice.cpp index b107b971..a8579647 100644 --- a/sp/src/game/server/hl2/npc_metropolice.cpp +++ b/sp/src/game/server/hl2/npc_metropolice.cpp @@ -3907,7 +3907,7 @@ int CNPC_MetroPolice::SelectScheduleNoDirectEnemy() #ifdef MAPBASE // If you see your enemy and you're still arming yourself, wait and don't just charge in // (if your weapon is holstered, you're probably about to arm yourself) - if ( HasCondition( COND_SEE_ENEMY ) && (IsWeaponHolstered() || FindGestureLayer( TranslateActivity( ACT_ARM ) )) ) + if ( HasCondition( COND_SEE_ENEMY ) && GetWeapon(0) && (IsWeaponHolstered() || FindGestureLayer( TranslateActivity( ACT_ARM ) ) != -1) ) { return SCHED_COMBAT_FACE; }