summaryrefslogtreecommitdiffhomepage
path: root/src/gameinfo.c
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2022-03-26 00:54:54 +0000
committerMichael Smith <mikesmiffy128@gmail.com>2022-03-26 23:23:05 +0000
commita621e712639775c461586eb5709b4de6d74f4341 (patch)
tree828019cd6ed0fe31258bdb136955fe2425eff9c3 /src/gameinfo.c
parent2c0d39acd0329d3e976bd83d85fcf67388465e67 (diff)
Fix L4D1 and L4DS crash regressions
Chalk this up to improper testing and being tired and not using brain.
Diffstat (limited to 'src/gameinfo.c')
-rw-r--r--src/gameinfo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gameinfo.c b/src/gameinfo.c
index 42bf3b4..31752a1 100644
--- a/src/gameinfo.c
+++ b/src/gameinfo.c
@@ -243,11 +243,14 @@ bool gameinfo_init(void *(*ifacef)(const char *, int *)) {
typedef char *(*VCALLCONV GetGameDirectory_func)(void *this);
GetGameDirectory_func **engclient;
int off;
- if (engclient = ifacef("VEngineClient014", 0)) { // bms, l4d2 2000
+ if (engclient = ifacef("VEngineClient015", 0)) { // portal 2
+ off = 35;
+ }
+ else if (engclient = ifacef("VEngineClient014", 0)) { // bms, l4d2 2000
off = 36;
}
else if (engclient = ifacef("VEngineClient013", 0)) { // ...most things?
- if (GAMETYPE_MATCHES(L4D2)) off = 36; // they changed it BACK?!?
+ if (GAMETYPE_MATCHES(L4Dx)) off = 36; // l4d2 changed it BACK?!?
else off = 35;
}
else if (engclient = ifacef("VEngineClient012", 0)) { // dmomm, ep1, ...