Merge branch 'sprint-finish' into 'master'

Disable bot controls after sprint map finish (resolves #260)

Closes #260

See merge request KartKrew/Kart!613
This commit is contained in:
Sal 2022-06-07 20:35:22 +00:00
commit 0905f55cf9

View file

@ -1292,6 +1292,12 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
return;
}
if (player->exiting && player->nextwaypoint == K_GetFinishLineWaypoint() && ((mapheaderinfo[gamemap - 1]->levelflags & LF_SECTIONRACE) == LF_SECTIONRACE))
{
// Sprint map finish, don't give Sal's children migraines trying to pathfind out
return;
}
botController = K_FindBotController(player->mo);
if (botController == NULL)
{