mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-08 18:40:26 +03:00
Fix engineer bots softlocking on ctf
This commit is contained in:
parent
3ae4d44b00
commit
65aa7c910e
@ -29,7 +29,8 @@ ActionResult< CTFBot > CTFBotEngineerBuildTeleportEntrance::OnStart( CTFBot *me,
|
||||
ActionResult< CTFBot > CTFBotEngineerBuildTeleportEntrance::Update( CTFBot *me, float interval )
|
||||
{
|
||||
CTeamControlPoint *point = me->GetMyControlPoint();
|
||||
if ( !point )
|
||||
CCaptureZone *zone = me->GetFlagCaptureZone();
|
||||
if ( !point && !zone )
|
||||
{
|
||||
// wait until a control point becomes available
|
||||
return Continue();
|
||||
@ -64,7 +65,14 @@ ActionResult< CTFBot > CTFBotEngineerBuildTeleportEntrance::Update( CTFBot *me,
|
||||
if ( !m_path.IsValid() )
|
||||
{
|
||||
CTFBotPathCost cost( me, FASTEST_ROUTE );
|
||||
m_path.Compute( me, point->GetAbsOrigin(), cost );
|
||||
if ( point )
|
||||
{
|
||||
m_path.Compute( me, point->GetAbsOrigin(), cost );
|
||||
}
|
||||
else if ( zone )
|
||||
{
|
||||
m_path.Compute( me, zone->WorldSpaceCenter(), cost );
|
||||
}
|
||||
}
|
||||
|
||||
m_path.Update( me );
|
||||
|
Loading…
x
Reference in New Issue
Block a user