diff --git a/dlls/bot/hl_bot.cpp b/dlls/bot/hl_bot.cpp index 6f11d5fc..112adde3 100644 --- a/dlls/bot/hl_bot.cpp +++ b/dlls/bot/hl_bot.cpp @@ -227,10 +227,10 @@ void CHLBot::BotTouch(CBaseEntity *other) CBasePlayer *player = static_cast(other); // get priority of other player - unsigned int otherPri = TheCSBots()->GetPlayerPriority(player); + unsigned int otherPri = TheHLBots()->GetPlayerPriority(player); // get our priority - unsigned int myPri = TheCSBots()->GetPlayerPriority(this); + unsigned int myPri = TheHLBots()->GetPlayerPriority(this); // if our priority is better, don't budge if (myPri < otherPri) @@ -239,7 +239,7 @@ void CHLBot::BotTouch(CBaseEntity *other) // they are higher priority - make way, unless we're already making way for someone more important if (m_avoid != NULL) { - unsigned int avoidPri = TheCSBots()->GetPlayerPriority(static_cast(static_cast(m_avoid))); + unsigned int avoidPri = TheHLBots()->GetPlayerPriority(static_cast(static_cast(m_avoid))); if (avoidPri < otherPri) { // ignore 'other' because we're already avoiding someone better @@ -549,7 +549,7 @@ int CHLBot::OutnumberedCount() const CBasePlayer *CHLBot::GetImportantEnemy(bool checkVisibility) const { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); CBasePlayer *nearEnemy = NULL; float nearDist = 999999999.9f; @@ -649,7 +649,7 @@ void CHLBot::DecreaseMorale() bool CHLBot::IsRogue() const { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); if (!ctrl->AllowRogues()) return false; @@ -675,7 +675,7 @@ bool CHLBot::IsHurrying() const if (!m_hurryTimer.IsElapsed()) return true; - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); return false; @@ -685,7 +685,7 @@ bool CHLBot::IsHurrying() const bool CHLBot::IsSafe() const { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); if (ctrl->GetElapsedRoundTime() < m_safeTime) return true; @@ -697,7 +697,7 @@ bool CHLBot::IsSafe() const bool CHLBot::IsWellPastSafe() const { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); if (ctrl->GetElapsedRoundTime() > 1.25f * m_safeTime) return true; @@ -716,7 +716,7 @@ bool CHLBot::IsEndOfSafeTime() const float CHLBot::GetSafeTimeRemaining() const { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); return m_safeTime - ctrl->GetElapsedRoundTime(); } @@ -725,7 +725,7 @@ float CHLBot::GetSafeTimeRemaining() const void CHLBot::AdjustSafeTime() { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); // if we spotted an enemy sooner than we thought possible, adjust our notion of "safe" time if (m_safeTime > ctrl->GetElapsedRoundTime()) @@ -747,7 +747,7 @@ bool CHLBot::HasNotSeenEnemyForLongTime() const bool CHLBot::GuardRandomZone(float range) { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); const CHLBotManager::Zone *zone = ctrl->GetRandomZone(); if (zone != NULL) diff --git a/dlls/bot/hl_bot_chatter.cpp b/dlls/bot/hl_bot_chatter.cpp index 81c51335..75d84021 100644 --- a/dlls/bot/hl_bot_chatter.cpp +++ b/dlls/bot/hl_bot_chatter.cpp @@ -1585,7 +1585,7 @@ void BotChatterInterface::ReportIn() void BotChatterInterface::ReportingIn() { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); BotStatement *say = new BotStatement(this, REPORT_INFORMATION, 10.0f); // where are we @@ -1688,7 +1688,7 @@ void BotChatterInterface::PinnedDown() void BotChatterInterface::HeardNoise(const Vector *pos) { - if (TheCSBots()->IsRoundOver()) + if (TheHLBots()->IsRoundOver()) return; if (m_heardNoiseTimer.IsElapsed()) @@ -1769,7 +1769,7 @@ void BotChatterInterface::CelebrateWin() say->SetStartTime(gpGlobals->time + RANDOM_FLOAT(2.0f, 5.0f)); const float quickRound = 45.0f; - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); if (m_me->GetFriendsRemaining() == 0) { @@ -1797,7 +1797,7 @@ void BotChatterInterface::CelebrateWin() void BotChatterInterface::AnnouncePlan(const char *phraseName, Place place) { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); if (ctrl->IsRoundOver()) return; diff --git a/dlls/bot/hl_bot_init.cpp b/dlls/bot/hl_bot_init.cpp index 732151c7..f97d26aa 100644 --- a/dlls/bot/hl_bot_init.cpp +++ b/dlls/bot/hl_bot_init.cpp @@ -279,7 +279,7 @@ void CHLBot::ResetValues() void CHLBot::SpawnBot() { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); ctrl->ValidateMapData(); ResetValues(); diff --git a/dlls/bot/hl_bot_manager.h b/dlls/bot/hl_bot_manager.h index af80b1d5..6cc67e10 100644 --- a/dlls/bot/hl_bot_manager.h +++ b/dlls/bot/hl_bot_manager.h @@ -247,7 +247,7 @@ NOXREF inline int OtherTeam(int team) return 0; } -inline CHLBotManager *TheCSBots() +inline CHLBotManager *TheHLBots() { return reinterpret_cast(TheBots); } diff --git a/dlls/bot/hl_bot_radio.cpp b/dlls/bot/hl_bot_radio.cpp index 070577d9..c97f2b5e 100644 --- a/dlls/bot/hl_bot_radio.cpp +++ b/dlls/bot/hl_bot_radio.cpp @@ -72,7 +72,7 @@ void CHLBot::RespondToRadioCommands() return; } - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); CBasePlayer *player = m_radioSubject; if (player == NULL) return; @@ -294,7 +294,7 @@ void CHLBot::SendRadioMessage(GameEventType event) return; } - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); PrintIfWatched("%3.1f: SendRadioMessage( %s )\n", gpGlobals->time, GameEventName[ event ]); // note the time the message was sent diff --git a/dlls/bot/hl_bot_update.cpp b/dlls/bot/hl_bot_update.cpp index 39ca9157..f8347ed6 100644 --- a/dlls/bot/hl_bot_update.cpp +++ b/dlls/bot/hl_bot_update.cpp @@ -4,7 +4,7 @@ void CHLBot::Upkeep() { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); if (ctrl->IsLearningMap() || !IsAlive()) return; @@ -153,7 +153,7 @@ void CHLBot::Upkeep() void CHLBot::Update() { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); if (ctrl->IsAnalysisRequested() && m_processMode == PROCESS_NORMAL) { diff --git a/dlls/bot/hl_bot_vision.cpp b/dlls/bot/hl_bot_vision.cpp index 2650f631..990043f2 100644 --- a/dlls/bot/hl_bot_vision.cpp +++ b/dlls/bot/hl_bot_vision.cpp @@ -204,7 +204,7 @@ bool CHLBot::IsVisible(Vector *pos, bool testFOV) const return false; // check line of sight against smoke - if (TheCSBots()->IsLineBlockedBySmoke(&GetEyePosition(), pos)) + if (TheHLBots()->IsLineBlockedBySmoke(&GetEyePosition(), pos)) return false; // check line of sight diff --git a/dlls/bot/hl_bot_weapon.cpp b/dlls/bot/hl_bot_weapon.cpp index 79635c4b..386092bb 100644 --- a/dlls/bot/hl_bot_weapon.cpp +++ b/dlls/bot/hl_bot_weapon.cpp @@ -52,7 +52,7 @@ void CHLBot::FireWeaponAtEnemy() bool doAttack; // if friendly fire is on, don't fire if a teammate is blocking our line of fire - if (TheCSBots()->AllowFriendlyFireDamage()) + if (TheHLBots()->AllowFriendlyFireDamage()) { if (IsFriendInLineOfFire()) doAttack = false; @@ -435,7 +435,7 @@ void CHLBot::EquipBestWeapon(bool mustEquip) if (!mustEquip && m_equipTimer.GetElapsedTime() < minEquipInterval) return; - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); CBasePlayerWeapon *primary = static_cast(m_rgpPlayerItems[ 2 ]); /// TODO: hl // always have a knife @@ -450,7 +450,7 @@ void CHLBot::EquipPistol() if (m_equipTimer.GetElapsedTime() < minEquipInterval) return; - if (TheCSBots()->AllowPistols() && !IsUsingPistol()) + if (TheHLBots()->AllowPistols() && !IsUsingPistol()) { CBasePlayerWeapon *pistol = static_cast(m_rgpPlayerItems[ 1 ]); DoEquip(pistol); diff --git a/dlls/bot/hl_gamestate.cpp b/dlls/bot/hl_gamestate.cpp index a3cc9a8f..4a0b3726 100644 --- a/dlls/bot/hl_gamestate.cpp +++ b/dlls/bot/hl_gamestate.cpp @@ -12,7 +12,7 @@ CHLGameState::CHLGameState(CHLBot *owner) void CHLGameState::Reset() { int i; - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); m_isRoundOver = false; diff --git a/dlls/bot/manager/nav_area.cpp b/dlls/bot/manager/nav_area.cpp index 1ed191d2..f894e76f 100644 --- a/dlls/bot/manager/nav_area.cpp +++ b/dlls/bot/manager/nav_area.cpp @@ -3516,7 +3516,7 @@ void CNavArea::DrawConnectedAreas() if (player == NULL) return; - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); const float maxRange = 500.0f; // draw self @@ -3686,7 +3686,7 @@ public: } bool operator()(CNavArea *area) { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); if (area->GetPlace() != m_initialPlace) return false; @@ -3704,7 +3704,7 @@ private: void EditNavAreas(NavEditCmdType cmd) { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); CBasePlayer *player = UTIL_GetLocalPlayer(); if (player == NULL) return; diff --git a/dlls/bot/states/hl_bot_idle.cpp b/dlls/bot/states/hl_bot_idle.cpp index e0ee8f89..30169e40 100644 --- a/dlls/bot/states/hl_bot_idle.cpp +++ b/dlls/bot/states/hl_bot_idle.cpp @@ -48,7 +48,7 @@ void IdleState::OnUpdate(CHLBot *me) } } - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); // if round is over, hunt if (me->GetGameState()->IsRoundOver()) diff --git a/dlls/bot/states/hl_bot_move_to.cpp b/dlls/bot/states/hl_bot_move_to.cpp index 98d99306..9aaa8ed5 100644 --- a/dlls/bot/states/hl_bot_move_to.cpp +++ b/dlls/bot/states/hl_bot_move_to.cpp @@ -38,7 +38,7 @@ void MoveToState::OnEnter(CHLBot *me) void MoveToState::OnUpdate(CHLBot *me) { - CHLBotManager *ctrl = TheCSBots(); + CHLBotManager *ctrl = TheHLBots(); // assume that we are paying attention and close enough to know our enemy died if (me->GetTask() == CHLBot::MOVE_TO_LAST_KNOWN_ENEMY_POSITION)