From c15101df02685a5d26f4b130f7b559eb7ed7f74f Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 15 Nov 2025 20:24:41 +0000 Subject: 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. --- src/fov.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/fov.c') 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 -- cgit v1.2.3-54-g00ecf