diff options
| author | 2026-01-14 18:30:46 +0000 | |
|---|---|---|
| committer | 2026-04-04 01:37:54 +0100 | |
| commit | aff3bd1fa58cf82b18fde505ef14d71fc9ca54e5 (patch) | |
| tree | f60bd07bd8274201b5259ca881182803cf79ad15 /src | |
| parent | 2344c8df392d4d8489c5bbee60a6894f908561e5 (diff) | |
| download | sst-aff3bd1fa58cf82b18fde505ef14d71fc9ca54e5.tar.gz sst-aff3bd1fa58cf82b18fde505ef14d71fc9ca54e5.zip | |
Fix autojump on 4104 (Portal and HL2 episodes)
Diffstat (limited to 'src')
| -rw-r--r-- | src/con_.c | 17 | ||||
| -rw-r--r-- | src/gametype.h | 7 |
2 files changed, 14 insertions, 10 deletions
@@ -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 |
