summaryrefslogtreecommitdiffhomepage
path: root/src/autojump.c
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2021-12-29 18:14:01 +0000
committerMichael Smith <mikesmiffy128@gmail.com>2021-12-29 18:18:42 +0000
commitd40d588f6d7cf866f7de41db9efffdd6c1a05135 (patch)
treecc1ff1eaecf3680815d7b30776f8b6264b0242e3 /src/autojump.c
parent8eecc029568bbe8e2f3c0d9af218ad3f957251c9 (diff)
Make convar init macro type-generic
This removes the need to call atof() on each cvar on plugin load; now all that's required is the memory allocations for the string values. The syntax is also a bit nicer since numbers can just be numbers rather than quoted strings. Minor issue: specifying a string value that also happens to be numeric will break this since the numeric representation will be zero, but I can't see a reason this would ever happen. Also, add a DEF_CVAR_MAX just for completeness.
Diffstat (limited to 'src/autojump.c')
-rw-r--r--src/autojump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/autojump.c b/src/autojump.c
index fa0f4b5..2a884c0 100644
--- a/src/autojump.c
+++ b/src/autojump.c
@@ -25,7 +25,7 @@
#include "os.h"
#include "vcall.h"
-DEF_CVAR(sst_autojump, "Jump upon hitting the group while holding space", "0",
+DEF_CVAR(sst_autojump, "Jump upon hitting the group while holding space", 0,
CON_REPLICATE | CON_DEMO | CON_HIDDEN)
struct vec3f { float x, y, z; };