From 7321a95a659c5497b18e47c0ec94525c82bd2801 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sat, 28 Sep 2019 15:14:52 -0400 Subject: [PATCH 1/3] Ring respawn timer is based on lap count (proportional to 3 laps) --- src/p_mobj.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/p_mobj.c b/src/p_mobj.c index 05975f8df..56afd25fd 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -11021,8 +11021,16 @@ void P_RespawnSpecials(void) if (pcount == 1) // No respawn when alone return; else if (pcount > 1) + { time = (180 - (pcount * 10))*TICRATE; + // If the map is longer or shorter than 3 laps, then adjust ring respawn to account for this. + // 5 lap courses would have more retreaded ground, while 2 lap courses would have less. + if ((mapheaderinfo[gamemap-1]->numlaps != 3) + && !(mapheaderinfo[gamemap-1]->levelflags & LF_SECTIONRACE)) + time = (time * 3) / mapheaderinfo[gamemap-1]->numlaps; + } + // only respawn items when cv_itemrespawn is on //if (!cv_itemrespawn.value) // TODO: remove this cvar //return; From 8fa5ada23d836f529248a069a6aaba88f8a70773 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sat, 28 Sep 2019 15:16:08 -0400 Subject: [PATCH 2/3] Allow ring usage during Shrink --- src/k_kart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_kart.c b/src/k_kart.c index 821f764d1..f603a0fa4 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -5953,7 +5953,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) && NO_HYUDORO && !(HOLDING_ITEM || player->kartstuff[k_itemamount] || player->kartstuff[k_itemroulette] - || player->kartstuff[k_growshrinktimer] // Being disabled during Shrink was unintended but people seemed to be okay with it sooo... + || player->kartstuff[k_growshrinktimer] > 0 || player->kartstuff[k_rocketsneakertimer] || player->kartstuff[k_eggmanexplode])) player->kartstuff[k_userings] = 1; From 7c40a1c07bf106d0024bec36cc70dc10335254ec Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sat, 28 Sep 2019 15:18:01 -0400 Subject: [PATCH 3/3] Make sure it doesn't divide by 0 --- src/p_mobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 56afd25fd..3694fc919 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -11028,7 +11028,7 @@ void P_RespawnSpecials(void) // 5 lap courses would have more retreaded ground, while 2 lap courses would have less. if ((mapheaderinfo[gamemap-1]->numlaps != 3) && !(mapheaderinfo[gamemap-1]->levelflags & LF_SECTIONRACE)) - time = (time * 3) / mapheaderinfo[gamemap-1]->numlaps; + time = (time * 3) / max(1, mapheaderinfo[gamemap-1]->numlaps); } // only respawn items when cv_itemrespawn is on