From 12563d254a4d5421f609b28628830a50c6d6172a Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Tue, 31 May 2022 16:40:00 -0500 Subject: [PATCH 1/2] Disable bot controls after sprint map finish (resolves !260) --- src/k_bot.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/k_bot.c b/src/k_bot.c index b2115bbea..2b266c470 100644 --- a/src/k_bot.c +++ b/src/k_bot.c @@ -1292,6 +1292,12 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd) return; } + if (player->exiting && ((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) { From 79cf985380056a78548613875ce942e9e8ee2842 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Tue, 31 May 2022 21:00:59 -0500 Subject: [PATCH 2/2] Allow bot control if knocked backwards after sprint finish --- src/k_bot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_bot.c b/src/k_bot.c index 2b266c470..0ae14c50e 100644 --- a/src/k_bot.c +++ b/src/k_bot.c @@ -1292,7 +1292,7 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd) return; } - if (player->exiting && ((mapheaderinfo[gamemap - 1]->levelflags & LF_SECTIONRACE) == LF_SECTIONRACE)) + 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;