From aff3bd1fa58cf82b18fde505ef14d71fc9ca54e5 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Wed, 14 Jan 2026 18:30:46 +0000 Subject: Fix autojump on 4104 (Portal and HL2 episodes) --- src/con_.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/con_.c') diff --git a/src/con_.c b/src/con_.c index c9f48ea..54574bc 100644 --- a/src/con_.c +++ b/src/con_.c @@ -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; } -- cgit v1.2.3-54-g00ecf