Fix crash bot_nav_use_place when place name is not exists

This commit is contained in:
s1lentq 2023-12-22 20:25:38 +07:00
parent b413577428
commit 28e2bc45f6

View File

@ -630,11 +630,15 @@ void CCSBotManager::ServerCommand(const char *pcmd)
{
CONSOLE_ECHO("Ambiguous\n");
}
else
else if (found)
{
CONSOLE_ECHO("Current place set to '%s'\n", found->GetName());
SetNavPlace(found->GetID());
}
else
{
CONSOLE_ECHO("Error - place name '%s' no exists in phrases BotChatter.db\n", msg);
}
}
}
else if (FStrEq(pcmd, "bot_nav_toggle_place_mode"))