From 062236629b5608a185046ef4f7448897b13211bf Mon Sep 17 00:00:00 2001 From: caxanga334 <10157643+caxanga334@users.noreply.github.com> Date: Thu, 13 Jun 2024 22:43:21 -0300 Subject: [PATCH] Bug fixes --- .../bot/tf2/tasks/engineer/tf2bot_engineer_build_object.cpp | 2 +- extension/bot/tf2/tasks/engineer/tf2bot_engineer_nest.cpp | 2 +- extension/bot/tf2/tasks/scenario/mvm/tf2bot_mvm_idle.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/bot/tf2/tasks/engineer/tf2bot_engineer_build_object.cpp b/extension/bot/tf2/tasks/engineer/tf2bot_engineer_build_object.cpp index 8948abd..851cc58 100644 --- a/extension/bot/tf2/tasks/engineer/tf2bot_engineer_build_object.cpp +++ b/extension/bot/tf2/tasks/engineer/tf2bot_engineer_build_object.cpp @@ -12,7 +12,7 @@ CTF2BotEngineerBuildObjectTask::CTF2BotEngineerBuildObjectTask(eObjectType type, m_type = type; m_goal = location; m_reachedGoal = false; - m_trydir = 0; + m_trydir = randomgen->GetRandomInt(0, 3); // randomize initial value switch (type) { diff --git a/extension/bot/tf2/tasks/engineer/tf2bot_engineer_nest.cpp b/extension/bot/tf2/tasks/engineer/tf2bot_engineer_nest.cpp index e29b764..5c29406 100644 --- a/extension/bot/tf2/tasks/engineer/tf2bot_engineer_nest.cpp +++ b/extension/bot/tf2/tasks/engineer/tf2bot_engineer_nest.cpp @@ -137,7 +137,7 @@ bool CTF2BotEngineerNestTask::FindSpotToBuildTeleEntrance(CTF2Bot* me, Vector& o } else { - buildGoal = hintAreas[randomgen->GetRandomInt(0, areas.size() - 1)]; + buildGoal = hintAreas[randomgen->GetRandomInt(0, hintAreas.size() - 1)]; } out = buildGoal->GetCenter(); diff --git a/extension/bot/tf2/tasks/scenario/mvm/tf2bot_mvm_idle.cpp b/extension/bot/tf2/tasks/scenario/mvm/tf2bot_mvm_idle.cpp index ec37025..4f4a20d 100644 --- a/extension/bot/tf2/tasks/scenario/mvm/tf2bot_mvm_idle.cpp +++ b/extension/bot/tf2/tasks/scenario/mvm/tf2bot_mvm_idle.cpp @@ -33,7 +33,7 @@ TaskResult CTF2BotMvMIdleTask::OnTaskUpdate(CTF2Bot* bot) return PauseFor(new CTF2BotMvMUpgradeTask, "Going to use an upgrade station!"); } - if (!bot->GetBehaviorInterface()->IsReady(bot) == ANSWER_YES) + if (bot->GetBehaviorInterface()->IsReady(bot) == ANSWER_YES) { if (!bot->TournamentIsReady() && tf2lib::MVM_ShouldBotsReadyUp()) {