diff --git a/src/game/server/tf/bot/behavior/tf_bot_seek_and_destroy.cpp b/src/game/server/tf/bot/behavior/tf_bot_seek_and_destroy.cpp index 5e78ea3e45f..bdd06b8f3bf 100644 --- a/src/game/server/tf/bot/behavior/tf_bot_seek_and_destroy.cpp +++ b/src/game/server/tf/bot/behavior/tf_bot_seek_and_destroy.cpp @@ -82,10 +82,15 @@ ActionResult< CTFBot > CTFBotSeekAndDestroy::Update( CTFBot *me, float interval return Done( "The point just unlocked" ); } } - - if ( !TFGameRules()->RoundHasBeenWon() && me->GetTimeLeftToCapture() < tf_bot_offense_must_push_time.GetFloat() ) + + // Added proper fix to the bot offense push time bug that causes seek and destroy to never happen + // Basically just check for these gamemodes and otherwise allow seek and destroy at all times + if (TFGameRules()->GetGameType() == TF_GAMETYPE_ESCORT || TFGameRules()->GetGameType() == TF_GAMETYPE_CP) { - return Done( "Time to push for the objective" ); + if (!TFGameRules()->RoundHasBeenWon() && me->GetTimeLeftToCapture() < tf_bot_offense_must_push_time.GetFloat()) + { + return Done("Time to push for the objective"); + } } } diff --git a/src/game/server/tf/bot/tf_bot.cpp b/src/game/server/tf/bot/tf_bot.cpp index d4b6810c31a..1921822cc30 100644 --- a/src/game/server/tf/bot/tf_bot.cpp +++ b/src/game/server/tf/bot/tf_bot.cpp @@ -2286,7 +2286,8 @@ float CTFBot::GetTimeLeftToCapture( void ) const return TFGameRules()->GetActiveRoundTimer()->GetTimeRemaining(); } - return 0.0f; + // Instead of returning 0.0, return FLT_MAX to prevent any other bugs related to this check. + return FLT_MAX; }