From 051a2176702a5d2be35c30fb88a986fdd864ccdd Mon Sep 17 00:00:00 2001 From: Blixibon Date: Tue, 11 May 2021 10:14:39 -0500 Subject: [PATCH] Added proper ACT_IDLE_ON_FIRE handling for Combine soldiers --- sp/src/game/server/hl2/npc_combine.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sp/src/game/server/hl2/npc_combine.cpp b/sp/src/game/server/hl2/npc_combine.cpp index d4ce19ac..15c12c76 100644 --- a/sp/src/game/server/hl2/npc_combine.cpp +++ b/sp/src/game/server/hl2/npc_combine.cpp @@ -1557,6 +1557,13 @@ Activity CNPC_Combine::NPC_BackupActivity( Activity eNewActivity ) else if (eNewActivity == ACT_RUN) return ACT_RUN_RIFLE; + // Some models might not contain ACT_COMBINE_BUGBAIT, which the soldier model uses instead of ACT_IDLE_ON_FIRE. + // Contrariwise, soldiers may be called to use ACT_IDLE_ON_FIRE in other parts of the AI and need to translate to ACT_COMBINE_BUGBAIT. + if (eNewActivity == ACT_COMBINE_BUGBAIT) + return ACT_IDLE_ON_FIRE; + else if (eNewActivity == ACT_IDLE_ON_FIRE) + return ACT_COMBINE_BUGBAIT; + return BaseClass::NPC_BackupActivity( eNewActivity ); } #endif