Merge branch 'ring-fast-respawn' into 'master'

Speed up ring respawn for anything more than 1v1s

See merge request KartKrew/Kart!641
This commit is contained in:
Sal 2022-08-23 07:48:59 +00:00
commit 22cca911f7

View file

@ -11008,16 +11008,20 @@ void P_RespawnSpecials(void)
else
{
if (pcount == 1) // No respawn when alone
{
return;
}
else if (pcount > 1)
{
time = (120 - ((pcount-2) * 10)) * TICRATE;
time = (120 - ((pcount-2) * 20)) * 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))
&& !(mapheaderinfo[gamemap-1]->levelflags & LF_SECTIONRACE))
{
time = (time * 3) / max(1, mapheaderinfo[gamemap-1]->numlaps);
}
if (time < 10*TICRATE)
{