debugbots: do not spawn prediction mobjs while game is paused

Ticcmd code runs while the game is paused, so this leads
to infinite mobjs being spawned without being cleaned up.
This commit is contained in:
James R 2024-01-11 02:48:42 -08:00
parent b932e23187
commit 076e2ad650

View file

@ -1854,7 +1854,7 @@ static void K_BuildBotTiccmdNormal(const player_t *player, ticcmd_t *cmd)
// Free the prediction we made earlier // Free the prediction we made earlier
if (predict != nullptr) if (predict != nullptr)
{ {
if (cv_kartdebugbots.value != 0 && player - players == displayplayers[0]) if (cv_kartdebugbots.value != 0 && player - players == displayplayers[0] && !(paused || P_AutoPause()))
{ {
K_DrawPredictionDebug(predict, player); K_DrawPredictionDebug(predict, player);
} }