Skip to content

Commit 2fb986c

Browse files
committed
Fix drop weapon to capture and immediately cancel loop
1 parent 431cb92 commit 2fb986c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/game/server/neo/bot/behavior/neo_bot_ctg_lone_wolf.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,9 @@ ActionResult< CNEOBot > CNEOBotCtgLoneWolf::Update( CNEOBot *me, float interval
267267

268268
if ( flDistToGhostSq < flAmbushDistSq)
269269
{
270-
if ( !bSafeToCap && me->Weapon_OwnsThisType("weapon_remotedet") )
270+
if ( !bSafeToCap )
271271
{
272-
return ChangeTo(new CNEOBotCtgLoneWolfAmbush(), "Setting up detpack ambush at ghost");
272+
return ChangeTo(new CNEOBotCtgLoneWolfAmbush(), "Ambushing near the ghost during stalemate");
273273
}
274274
else
275275
{

src/game/server/neo/bot/behavior/neo_bot_ctg_lone_wolf_ambush.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ ActionResult< CNEOBot > CNEOBotCtgLoneWolfAmbush::OnStart( CNEOBot *me, Action<
4444
m_repathTimer.Invalidate();
4545
m_ambushExpirationTimer.Start( RandomFloat( 30.0f, 90.0f ) );
4646

47+
if ( !m_hDetpackWeapon )
48+
{
49+
// Don't need to plant detpack
50+
m_path.Invalidate();
51+
}
52+
4753
return Continue();
4854
}
4955

0 commit comments

Comments
 (0)