diff --git a/src/game/server/tf/bot/behavior/engineer/tf_bot_engineer_build_teleport_entrance.cpp b/src/game/server/tf/bot/behavior/engineer/tf_bot_engineer_build_teleport_entrance.cpp index c6924aa99..fa16adf99 100644 --- a/src/game/server/tf/bot/behavior/engineer/tf_bot_engineer_build_teleport_entrance.cpp +++ b/src/game/server/tf/bot/behavior/engineer/tf_bot_engineer_build_teleport_entrance.cpp @@ -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 );