summaryrefslogtreecommitdiff
path: root/src/con_.c
diff options
context:
space:
mode:
authorGravatar Michael Smith <mikesmiffy128@gmail.com> 2026-01-14 18:30:46 +0000
committerGravatar Michael Smith <mikesmiffy128@gmail.com> 2026-04-04 01:37:54 +0100
commitaff3bd1fa58cf82b18fde505ef14d71fc9ca54e5 (patch)
treef60bd07bd8274201b5259ca881182803cf79ad15 /src/con_.c
parent2344c8df392d4d8489c5bbee60a6894f908561e5 (diff)
downloadsst-aff3bd1fa58cf82b18fde505ef14d71fc9ca54e5.tar.gz
sst-aff3bd1fa58cf82b18fde505ef14d71fc9ca54e5.zip
Fix autojump on 4104 (Portal and HL2 episodes)
Diffstat (limited to 'src/con_.c')
-rw-r--r--src/con_.c17
1 files changed, 11 insertions, 6 deletions
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;
}