diff --git a/src/cvars.cpp b/src/cvars.cpp index 83c360eb2..d092a322b 100644 --- a/src/cvars.cpp +++ b/src/cvars.cpp @@ -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"); diff --git a/src/k_menufunc.c b/src/k_menufunc.c index 624625dab..16d255838 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -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) @@ -220,7 +223,7 @@ static void M_ChangeCvar(INT32 choice) "Turning on Auto Roulette", "\"Ring Racers\" is not designed with random items in mind. With Auto Roulette, you cannot select the item results you want or select an item early." "\n" - "You will be at a distinct \x85" "disadvantage. \x80\n" + "You will be at a distinct \x85" "disadvantage. \x80\n" "\n" "ARE YOU SURE?", M_ChangeCvarResponse,