From e8b3f84741cf2aa80d8e9ba49f68e54828fa7d9d Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 26 Nov 2019 11:53:49 +0000 Subject: [PATCH 1/3] Prevent Tailsbot from considering flight when Sonic is exiting. --- src/b_bot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/b_bot.c b/src/b_bot.c index 709a280b5..895c8d18d 100644 --- a/src/b_bot.c +++ b/src/b_bot.c @@ -135,7 +135,7 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm // ******** // FLY MODE // spinmode check - if (spinmode) + if (spinmode || player->exiting) thinkfly = false; else { From 6ac44415fb34c90b2c2375fb7f83892b65e3b20f Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 26 Nov 2019 11:55:31 +0000 Subject: [PATCH 2/3] Make P_CanPickupItem check whether Sonic is in a state to recieve it when Tailsbot tries to get it. Specfically, this fixes the case where Sonic runs into something hazardous and spills his rings, but Tailsbot is immediately behind and ends up picking them all up the tic before they also get hurt. --- src/p_inter.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index d1ea02c80..a81be3c3a 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -148,15 +148,21 @@ void P_ResetStarposts(void) // boolean P_CanPickupItem(player_t *player, boolean weapon) { - if (player->bot && weapon) +soniccheck: + if (!player->mo || player->mo->health <= 0) return false; + if (player->bot) + { + if (weapon || players[consoleplayer].bot) + return false; + player = &players[consoleplayer]; + goto soniccheck; + } + if (player->powers[pw_flashing] > (flashingtics/4)*3 && player->powers[pw_flashing] < UINT16_MAX) return false; - if (player->mo && player->mo->health <= 0) - return false; - return true; } From c55a6cb3f8f15eb4b45f6cb312838e5f8d8cda8f Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 26 Nov 2019 17:10:59 -0500 Subject: [PATCH 3/3] MascaraSnake is a bully and will make a pariah out of me in front of his doctoral student colleagues if I don't change this --- src/p_inter.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index a81be3c3a..0ff75b3eb 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -148,16 +148,14 @@ void P_ResetStarposts(void) // boolean P_CanPickupItem(player_t *player, boolean weapon) { -soniccheck: if (!player->mo || player->mo->health <= 0) return false; if (player->bot) { - if (weapon || players[consoleplayer].bot) + if (weapon) return false; - player = &players[consoleplayer]; - goto soniccheck; + return P_CanPickupItem(&players[consoleplayer], true); // weapon is true to prevent infinite recursion if p1 is bot - doesn't occur in vanilla, but may be relevant for mods } if (player->powers[pw_flashing] > (flashingtics/4)*3 && player->powers[pw_flashing] < UINT16_MAX)