aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Hayden K <imaciidz@gmail.com> 2025-02-07 14:32:18 -0500
committerGravatar Michael Smith <mikesmiffy128@gmail.com> 2025-04-06 20:59:36 +0100
commit31d5cd8bb68276353edc4e79e8b58eaf86b61630 (patch)
treeb05f876b7e44fb2679fdb112653b1f6641e85ab2
parentdc540372be9da686a3087843ae4ae5f038a3a9a0 (diff)
downloadsst-31d5cd8bb68276353edc4e79e8b58eaf86b61630.tar.gz
sst-31d5cd8bb68276353edc4e79e8b58eaf86b61630.zip
Add L4D1_1015plus and L4D1_1022plus gametype tags
1022 is the update that adds Mac support and introduces some of the already known vtable changes (this update is similar to 2040 for L4D2 in that regard), the tag will also see some use in some upcoming features. The 1015 tag is questionably necessary, but will be used for at least one feature (it's also the update that adds the newer matchmaking interfaces used in l4dreset.c, but having the tag available doesn't help anything there).
-rw-r--r--gamedata/engine.txt3
-rw-r--r--src/engineapi.c12
-rw-r--r--src/gametype.h6
3 files changed, 18 insertions, 3 deletions
diff --git a/gamedata/engine.txt b/gamedata/engine.txt
index ab6fbd5..a50f9ce 100644
--- a/gamedata/engine.txt
+++ b/gamedata/engine.txt
@@ -48,7 +48,8 @@ vtidx_GetGameDirectory
Client012 37 # dmomm, ep1, ...
vtidx_GetEngineBuildNumber
Client013
- L4D2 99
+ L4D 99
+ L4D1_1022plus 97
Portal2 100
Client014
L4D2 31
diff --git a/src/engineapi.c b/src/engineapi.c
index cc5f2cf..87a8858 100644
--- a/src/engineapi.c
+++ b/src/engineapi.c
@@ -105,6 +105,18 @@ bool engineapi_init(int pluginver) {
}
}
+ if (GAMETYPE_MATCHES(L4D1)) {
+ // Crash Course update
+ if (con_findcmd("director_log_scavenge_items")) {
+ _gametype_tag |= _gametype_tag_L4D1_1015plus;
+ }
+ // seems there was some code shuffling in the Mac update (1022)
+ // this update came like 2-3 weeks after The Sacrifice itself released
+ if (con_findvar("tank_stasis_time_suicide")) {
+ _gametype_tag |= _gametype_tag_L4D1_1022plus;
+ }
+ }
+
if (GAMETYPE_MATCHES(L4D2)) {
if (con_findvar("sv_zombie_touch_trigger_delay")) {
_gametype_tag |= _gametype_tag_L4D2_2125plus;
diff --git a/src/gametype.h b/src/gametype.h
index 98d360a..bed093d 100644
--- a/src/gametype.h
+++ b/src/gametype.h
@@ -54,8 +54,10 @@ extern u32 _gametype_tag;
/* games needing version-specific stuff */
#define _gametype_tag_Portal1_3420 (1 << 17)
-#define _gametype_tag_L4D2_2125plus (1 << 18)
-#define _gametype_tag_TheLastStand (1 << 19) /* The JAiZ update */
+#define _gametype_tag_L4D1_1015plus (1 << 18) // Crash Course update
+#define _gametype_tag_L4D1_1022plus (1 << 19) // Mac update, with code shuffling
+#define _gametype_tag_L4D2_2125plus (1 << 20)
+#define _gametype_tag_TheLastStand (1 << 21) /* The JAiZ update */
/* Matches for any multiple possible tags */
#define _gametype_tag_L4D (_gametype_tag_L4D1 | _gametype_tag_L4D2)