This commit is contained in:
s1lentq 2025-04-04 08:24:33 +07:00
parent a4d74392f0
commit f3d8d1b5fd
2 changed files with 4 additions and 4 deletions

View File

@ -941,7 +941,7 @@ void CCSBot::RemovePath(CNavArea *area)
void CCSBot::RemoveHidingSpot(HidingSpot *spot)
{
int i = 0;
while (i < m_pathLength)
while (i < m_checkedHidingSpotCount)
{
if (m_checkedHidingSpot[i].spot == spot)
{

View File

@ -1535,7 +1535,7 @@ void CCSBotManager::OnDestroyNavDataNotify(NavNotifyDestroyType navNotifyType, v
// and triggers a game restart after the analysis is completed
void CCSBotManager::AnalysisCompleted()
{
// Ensure that all bots are no longer involved in map analysis and start their normal process
// Ensure that all bots are no longer involved in map analysis and start their normal process
for (int i = 1; i <= gpGlobals->maxClients; i++)
{
CBasePlayer *pPlayer = UTIL_PlayerByIndex(i);
@ -1554,10 +1554,10 @@ void CCSBotManager::AnalysisCompleted()
m_isMapDataLoaded = false;
m_isAnalysisRequested = false;
// Try to reload the navigation map from the file
// Try to reload the navigation map from the file
if (LoadNavigationMap())
{
// Initiate a game restart in 3 seconds
// Initiate a game restart in 3 seconds
CVAR_SET_FLOAT("sv_restart", 3);
}
}