From f38fc784ffab00c11b9818d18f55be34cc8aa130 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 21 Jun 2025 14:46:10 +0100 Subject: Abstract over con_var layout changes from OE to NE This doesn't allow us to support OE in and of itself but is part of the groundwork necessary to do so in the future. --- src/inputhud.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/inputhud.c') diff --git a/src/inputhud.c b/src/inputhud.c index fdefe6a..b93e9d8 100644 --- a/src/inputhud.c +++ b/src/inputhud.c @@ -432,14 +432,16 @@ INIT { // HL2 sprint HUD, so move it up. This is a bit yucky, but at least we don't // have to go through all the virtual setter crap twice... if (GAMETYPE_MATCHES(L4D)) { - sst_inputhud_y->defaultval = "0.82"; - sst_inputhud_y->fval = 0.82f; - sst_inputhud_y->ival = 0; + struct con_var_common *c = con_getvarcommon(sst_inputhud_y); + c->defaultval = "0.82"; + c->fval = 0.82f; + c->ival = 0; } else if (GAMETYPE_MATCHES(HL2series)) { - sst_inputhud_y->defaultval = "0.75"; - sst_inputhud_y->fval = 0.75f; - sst_inputhud_y->ival = 0; + struct con_var_common *c = con_getvarcommon(sst_inputhud_y); + c->defaultval = "0.75"; + c->fval = 0.75f; + c->ival = 0; } return FEAT_OK; -- cgit v1.2.3-54-g00ecf