mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'gravitycheat' into 'master'
Fix gravity CVAR crashing when changed from the menu (resolves #106) Closes #106 See merge request KartKrew/RingRacers!21
This commit is contained in:
commit
60549f03b1
2 changed files with 5 additions and 2 deletions
|
|
@ -860,7 +860,7 @@ consvar_t cv_ufo_health = OnlineCheat("ufo_health", "-1").min_max(-1, 100).descr
|
|||
consvar_t cv_botscanvote = ServerCheat("botscanvote", "No").yes_no();
|
||||
|
||||
void Gravity_OnChange(void);
|
||||
consvar_t cv_gravity = ServerCheat("gravity", "0.8").floating_point().onchange(Gravity_OnChange).description("Change the default gravity"); // change DEFAULT_GRAVITY if you change this
|
||||
consvar_t cv_gravity = ServerCheat("gravity", "0.8").floating_point().min_max(0, 200*FRACUNIT).onchange(Gravity_OnChange).description("Change the default gravity"); // change DEFAULT_GRAVITY if you change this
|
||||
|
||||
consvar_t cv_kartdebugcolorize = ServerCheat("debugcolorize", "Off").on_off().description("Show all colorized options on the HUD");
|
||||
consvar_t cv_kartdebugdirector = ServerCheat("debugdirector", "Off").on_off().description("Show director AI on the HUD");
|
||||
|
|
|
|||
|
|
@ -88,6 +88,9 @@ static void M_AddFloatVar(consvar_t *cv, fixed_t step)
|
|||
|
||||
const CV_PossibleValue_t *values = cv->PossibleValue;
|
||||
|
||||
if (values == NULL) //cvar is unbounded and will not work! return is here only as a failsafe to prevent crashes
|
||||
return;
|
||||
|
||||
for (i = 0; values[i].strvalue; ++i)
|
||||
{
|
||||
if (cv->value == values[i].value)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue