Make sure it doesn't divide by 0

This commit is contained in:
TehRealSalt 2019-09-28 15:18:01 -04:00
parent 8fa5ada23d
commit 7c40a1c07b

View file

@ -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