mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-16 06:30:52 +00:00
Upper-bound restrict the setting of numlaps for sectionrace levels mid-game
This commit is contained in:
parent
d8955f1f87
commit
2c8855cd5f
1 changed files with 10 additions and 2 deletions
|
@ -4231,8 +4231,16 @@ static void PointLimit_OnChange(void)
|
||||||
|
|
||||||
static void NumLaps_OnChange(void)
|
static void NumLaps_OnChange(void)
|
||||||
{
|
{
|
||||||
|
if (!G_RaceGametype() || (modeattacking || demoplayback))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (server && Playing()
|
||||||
|
&& (netgame || multiplayer)
|
||||||
|
&& (mapheaderinfo[gamemap - 1]->levelflags & LF_SECTIONRACE)
|
||||||
|
&& (cv_numlaps.value > mapheaderinfo[gamemap - 1]->numlaps))
|
||||||
|
CV_StealthSetValue(&cv_numlaps, mapheaderinfo[gamemap - 1]->numlaps);
|
||||||
|
|
||||||
// Just don't be verbose
|
// Just don't be verbose
|
||||||
if (G_RaceGametype() && !(modeattacking || demoplayback))
|
|
||||||
CONS_Printf(M_GetText("Number of laps set to %d\n"), cv_numlaps.value);
|
CONS_Printf(M_GetText("Number of laps set to %d\n"), cv_numlaps.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue