summaryrefslogtreecommitdiffhomepage
path: root/src/con_.h
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2022-04-26 17:23:51 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2022-04-26 17:23:51 +0100
commit1aaedffd8c68614936c59d4681e6dc111cb32691 (patch)
treed215f1667d82a6a1cd417383900e2f0a5b89666f /src/con_.h
parentbdb4453a8fbe87247bfd6caf19a7d643144c0f84 (diff)
Fix a couple of bits of convar min/max brokenness
It's amazing how long these things can go unnoticed.
Diffstat (limited to 'src/con_.h')
-rw-r--r--src/con_.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/con_.h b/src/con_.h
index a5d0c87..ed93bad 100644
--- a/src/con_.h
+++ b/src/con_.h
@@ -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_) \