aboutsummaryrefslogtreecommitdiff
path: root/src/fov.c
diff options
context:
space:
mode:
authorGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-11-15 20:24:41 +0000
committerGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-11-15 20:24:41 +0000
commitc15101df02685a5d26f4b130f7b559eb7ed7f74f (patch)
tree5803259d20a291278c9cc7dfd6bc346198f0edb0 /src/fov.c
parent650bb761d3e5af3f8fa19ac8d22864cc0360d085 (diff)
downloadsst-c15101df02685a5d26f4b130f7b559eb7ed7f74f.tar.gz
sst-c15101df02685a5d26f4b130f7b559eb7ed7f74f.zip
Deal with CON_HIDDEN not existing in OE
Pretty hacky for now, but not the worst thing in the world. Can always be tidied up later.
Diffstat (limited to 'src/fov.c')
-rw-r--r--src/fov.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fov.c b/src/fov.c
index c822584..8bfa2ab 100644
--- a/src/fov.c
+++ b/src/fov.c
@@ -42,7 +42,7 @@ REQUEST(ent)
DEF_CVAR_MINMAX_UNREG(fov_desired,
"Set the base field of view (SST reimplementation)", 75, 75, 120,
- CON_HIDDEN | CON_ARCHIVE)
+ CON_INIT_HIDDEN | CON_ARCHIVE)
static struct con_var *real_fov_desired; // engine's if it has it, or ours
typedef void (*VCALLCONV SetDefaultFOV_func)(void *, int);
@@ -111,9 +111,10 @@ INIT {
// we might not be using our cvar but simpler to do this unconditionally
fov_desired->cb = &fovcb;
- fov_desired->base.flags &= ~CON_HIDDEN;
+ con_unhide(&fov_desired->base);
// hide the original fov command since we've effectively broken it anyway :)
- cmd_fov->base.flags |= CON_DEVONLY;
+ // NOTE: assumes NE. fine for now because we're GAMESPECIFIC.
+ cmd_fov->base.flags |= _CON_NE_DEVONLY;
return FEAT_OK;
}
@@ -130,7 +131,7 @@ END {
if (player) orig_SetDefaultFOV(player, 75);
}
unhook_inline((void *)orig_SetDefaultFOV);
- cmd_fov->base.flags &= ~CON_DEVONLY;
+ cmd_fov->base.flags &= ~_CON_NE_DEVONLY;
}
// vi: sw=4 ts=4 noet tw=80 cc=80