mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-03 15:32:45 +00:00
Upper-bound restrict the setting of numlaps for sectionrace levels mid-game
This commit is contained in:
parent
2cf5350c0f
commit
7b3e55b431
1 changed files with 10 additions and 2 deletions
|
|
@ -4231,9 +4231,17 @@ 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void NetTimeout_OnChange(void)
|
static void NetTimeout_OnChange(void)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue