diff options
| author | 2026-01-14 18:30:46 +0000 | |
|---|---|---|
| committer | 2026-04-04 01:37:54 +0100 | |
| commit | aff3bd1fa58cf82b18fde505ef14d71fc9ca54e5 (patch) | |
| tree | f60bd07bd8274201b5259ca881182803cf79ad15 | |
| parent | 2344c8df392d4d8489c5bbee60a6894f908561e5 (diff) | |
| download | sst-aff3bd1fa58cf82b18fde505ef14d71fc9ca54e5.tar.gz sst-aff3bd1fa58cf82b18fde505ef14d71fc9ca54e5.zip | |
Fix autojump on 4104 (Portal and HL2 episodes)
| -rw-r--r-- | gamedata/engine.txt | 5 | ||||
| -rw-r--r-- | gamedata/gamelib.txt | 16 | ||||
| -rw-r--r-- | src/con_.c | 17 | ||||
| -rw-r--r-- | src/gametype.h | 7 |
4 files changed, 26 insertions, 19 deletions
diff --git a/gamedata/engine.txt b/gamedata/engine.txt index 67cf47e..eb6e8e1 100644 --- a/gamedata/engine.txt +++ b/gamedata/engine.txt @@ -59,9 +59,10 @@ vtidx_GetEngineBuildNumber Client014 L4D2 31 2013 98 - Portal1_3420 91 + OrangeBox + Portal1 91 # probably applies to other 2007 stuff too? haven't tested # TODO(compat): we'll need these... but need to detect first - #Portal1_5135 102 + #Portal1_5135 102 # probably applies to everything 5135? #L4D1_1005 99 #L4D1_Steam 97 vtidx_ManageAddonsForActiveSession diff --git a/gamedata/gamelib.txt b/gamedata/gamelib.txt index 26e4758..3fd3725 100644 --- a/gamedata/gamelib.txt +++ b/gamedata/gamelib.txt @@ -1,14 +1,16 @@ # CGameMovement vtidx_CheckJumpButton - OE 14 + NVDTOR - Portal1_3420 22 + NVDTOR - 2013 28 + NVDTOR - L4D 32 + NVDTOR - L4DS 33 + NVDTOR - Portal2 35 + NVDTOR + OE 14 + NVDTOR + OrangeBox 22 + NVDTOR + 2013 28 + NVDTOR + Near4104 22 + NVDTOR + L4D 32 + NVDTOR + L4DS 33 + NVDTOR + Portal2 35 + NVDTOR off_mv 8 OE 4 - Portal1_3420 4 + OrangeBox 4 + Near4104 4 # IServerGameDLL vtidx_GetAllServerClasses 10 @@ -553,15 +553,20 @@ bool con_detect(int pluginver) { if (_con_iface = factory_engine("VEngineCvar004", 0)) { // TODO(compat): are there any cases where 004 is incompatible? could // this crash? find out! - if (pluginver == 3) _gametype_tag |= _gametype_tag_2013; - else _gametype_tag |= _gametype_tag_OrangeBox; - // detect Portal 1 versions while we're here... - if (FindCommand_nonp2(_con_iface, "upgrade_portalgun")) { - _gametype_tag |= _gametype_tag_Portal1; + if (pluginver == 3) { + _gametype_tag |= _gametype_tag_2013; + // this was added *some time* after 4104, or around 5135. don't know + // exactly. good enough for our current compatibility needs. if (!FindVar_nonp2(_con_iface, "tf_escort_score_rate")) { - _gametype_tag |= _gametype_tag_Portal1_3420; + _gametype_tag |= _gametype_tag_Near4104; } } + else /* pluginver == 2 */ { + _gametype_tag |= _gametype_tag_OrangeBox; + } + if (FindCommand_nonp2(_con_iface, "upgrade_portalgun")) { + _gametype_tag |= _gametype_tag_Portal1; + } else if (FindCommand_nonp2(_con_iface, "phys_swap")) { _gametype_tag |= _gametype_tag_HL2series; } diff --git a/src/gametype.h b/src/gametype.h index 4e2dc55..b21c98b 100644 --- a/src/gametype.h +++ b/src/gametype.h @@ -26,8 +26,8 @@ extern u32 _gametype_tag; #define GAMETYPE_BASETAGS(ALL, WINDOWSONLY) \ /* general engine branches used in a bunch of stuff */ \ WINDOWSONLY(OE) \ - ALL(OrangeBox) \ - ALL(2013) \ + ALL(OrangeBox) /* 2007, plugin interface v2 */ \ + ALL(2013) /* ~2013, sometimes earlier (includes 4104), interface v3 */ \ \ /* specific games with dedicated branches / engine changes */ \ /* TODO(compat): dmomm seems to fail currently (VEngineServer broke?) */ \ @@ -55,7 +55,7 @@ extern u32 _gametype_tag; ALL(SrvDLL005) /* mostly everything else, it seems */ \ \ /* games needing version-specific stuff */ \ - WINDOWSONLY(Portal1_3420) \ + WINDOWSONLY(Near4104) /* Episode 1 and 2, Portal 1, some time around 2010 */ \ WINDOWSONLY(L4D1_1015plus) /* Crash Course update */ \ WINDOWSONLY(L4D1_1022plus) /* Mac update, bunch of code reshuffling */ \ ALL(L4D2_2125plus) \ @@ -78,7 +78,6 @@ GAMETYPE_BASETAGS(_GAMETYPE_ENUMBIT, _GAMETYPE_DISCARD) GAMETYPE_BASETAGS(_GAMETYPE_ENUMVAL, _GAMETYPE_DISCARD) GAMETYPE_BASETAGS(_GAMETYPE_DISCARD, _GAMETYPE_ZERO) #endif -#define _GAMETYPE_ENUMVAL(x) _gametype_tag_##x = 1 << _gametype_tagbit_##x, #undef _GAMETYPE_ZERO #undef _GAMETYPE_DISCARD #undef _GAMETYPE_ENUMVAL |
