summaryrefslogtreecommitdiff
path: root/src/inputhud.c
diff options
context:
space:
mode:
authorGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-06-21 14:46:10 +0100
committerGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-06-21 14:50:00 +0100
commitf38fc784ffab00c11b9818d18f55be34cc8aa130 (patch)
treea6370ebb95506003ae6b984f724d42369efae366 /src/inputhud.c
parentac7e7d0f21978afc70fe3ef76db69d575742b974 (diff)
downloadsst-f38fc784ffab00c11b9818d18f55be34cc8aa130.tar.gz
sst-f38fc784ffab00c11b9818d18f55be34cc8aa130.zip
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.
Diffstat (limited to 'src/inputhud.c')
-rw-r--r--src/inputhud.c14
1 files changed, 8 insertions, 6 deletions
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;