diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/con_.h | 10 | ||||
-rw-r--r-- | src/fixes.c | 1 |
2 files changed, 6 insertions, 5 deletions
@@ -141,9 +141,9 @@ struct con_var { // ConVar in engine int ival; bool hasmin; // bool hasmax; // better packing here, might break engine ABI - int minval; + float minval; bool hasmax; // just sticking to sdk position for now - int maxval; + float maxval; //void *cb; // we don't currently bother with callback support. add if needed! }; @@ -253,15 +253,15 @@ extern void *_con_vtab_iconvar[]; _DEF_CVAR(name, desc, value, false, 0, false, 0, flags) /* Defines a console variable with a given mininum numeric value. */ -#define DEF_CVAR_MIN(name_, desc, value, min, flags_) \ +#define DEF_CVAR_MIN(name, desc, value, min, flags) \ _DEF_CVAR(name, desc, value, true, min, false, 0, flags) /* Defines a console variable with a given maximum numeric value. */ -#define DEF_CVAR_MAX(name_, desc, value, max, flags_) \ +#define DEF_CVAR_MAX(name, desc, value, max, flags) \ _DEF_CVAR(name, desc, value, false, 0, true, max, flags) /* Defines a console variable in the given numeric value range. */ -#define DEF_CVAR_MINMAX(name_, desc, value, min, max, flags_) \ +#define DEF_CVAR_MINMAX(name, desc, value, min, max, flags) \ _DEF_CVAR(name, desc, value, true, min, true, max, flags) #define _DEF_CCMD(varname, name_, desc, func, flags_) \ diff --git a/src/fixes.c b/src/fixes.c index e1b4c0a..ca5aaf0 100644 --- a/src/fixes.c +++ b/src/fixes.c @@ -94,6 +94,7 @@ static void l4d2specific(void) { if (v && !(v->parent->base.flags & CON_ARCHIVE)) { // not already fixed v->parent->base.flags = v->parent->base.flags & ~(CON_HIDDEN | CON_DEVONLY) | CON_ARCHIVE; + v->parent->hasmin = true; v->parent->minval = -1; v->parent->hasmax = true; v->parent->maxval = 0; } |