From a621e712639775c461586eb5709b4de6d74f4341 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 26 Mar 2022 00:54:54 +0000 Subject: Fix L4D1 and L4DS crash regressions Chalk this up to improper testing and being tired and not using brain. --- src/gameinfo.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gameinfo.c') 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, ... -- cgit v1.2.3