mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Rework G_SetCustomExitVars to allow skipstats 2
This commit is contained in:
parent
d46bd4e8f1
commit
e3dbbfe34a
1 changed files with 8 additions and 14 deletions
|
|
@ -2664,23 +2664,17 @@ static int lib_gSetCustomExitVars(lua_State *L)
|
||||||
// Supported:
|
// Supported:
|
||||||
// G_SetCustomExitVars(); [reset to defaults]
|
// G_SetCustomExitVars(); [reset to defaults]
|
||||||
// G_SetCustomExitVars(int) [nextmap override only]
|
// G_SetCustomExitVars(int) [nextmap override only]
|
||||||
// G_SetCustomExitVars(bool) [skipstats only]
|
// G_SetCustomExitVars(nil, int) [skipstats only]
|
||||||
// G_SetCustomExitVars(int, bool) [both of the above]
|
// G_SetCustomExitVars(int, int) [both of the above]
|
||||||
if (n >= 1)
|
|
||||||
{
|
|
||||||
if (lua_isnumber(L, 1) || n >= 2)
|
|
||||||
{
|
|
||||||
nextmapoverride = (INT16)luaL_checknumber(L, 1);
|
|
||||||
lua_remove(L, 1); // remove nextmapoverride; skipstats now 1 if available
|
|
||||||
}
|
|
||||||
skipstats = luaL_optinteger(L, 2, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
nextmapoverride = 0;
|
nextmapoverride = 0;
|
||||||
skipstats = 0;
|
skipstats = 0;
|
||||||
|
|
||||||
|
if (n >= 1)
|
||||||
|
{
|
||||||
|
nextmapoverride = (INT16)luaL_optinteger(L, 1, 0);
|
||||||
|
skipstats = (INT16)luaL_optinteger(L, 2, 0);
|
||||||
}
|
}
|
||||||
// ---
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue