From dc540372be9da686a3087843ae4ae5f038a3a9a0 Mon Sep 17 00:00:00 2001 From: Hayden K Date: Fri, 7 Feb 2025 14:22:37 -0500 Subject: Rename L4D2_2147plus gametype tag to L4D2_2125plus Turns out the cvar we use to detect 2147 was actually added in 2125. Since renaming it doesn't currently break anything (and 2125 was a fairly notable code shuffling update, given it was the first update with a native Linux build of the game), it makes most sense to just do this. --- src/engineapi.c | 3 ++- src/fastfwd.c | 3 ++- src/gametype.h | 3 ++- src/l4daddon.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/engineapi.c b/src/engineapi.c index a8f4167..cc5f2cf 100644 --- a/src/engineapi.c +++ b/src/engineapi.c @@ -1,6 +1,7 @@ /* * Copyright © 2025 Michael Smith * Copyright © 2023 Willian Henrique + * Copyright © 2025 Hayden K * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -106,7 +107,7 @@ bool engineapi_init(int pluginver) { if (GAMETYPE_MATCHES(L4D2)) { if (con_findvar("sv_zombie_touch_trigger_delay")) { - _gametype_tag |= _gametype_tag_L4D2_2147plus; + _gametype_tag |= _gametype_tag_L4D2_2125plus; } if (con_findvar("director_cs_weapon_spawn_chance")) { _gametype_tag |= _gametype_tag_TheLastStand; diff --git a/src/fastfwd.c b/src/fastfwd.c index 7378b04..fa45beb 100644 --- a/src/fastfwd.c +++ b/src/fastfwd.c @@ -2,6 +2,7 @@ * Copyright © 2023 Matthew Wozniak * Copyright © 2025 Michael Smith * Copyright © 2023 Willian Henrique + * Copyright © 2025 Hayden K * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -221,7 +222,7 @@ INIT { errmsg_errorx("couldn't find FrameUpdate function"); return FEAT_INCOMPAT; } - if_cold (!(func = find_floatcall(func, GAMETYPE_MATCHES(L4D2_2147plus) ? + if_cold (!(func = find_floatcall(func, GAMETYPE_MATCHES(L4D2_2125plus) ? 2 : 1, "CHostState::State_Run"))) { errmsg_errorx("couldn't find State_Run function"); return FEAT_INCOMPAT; diff --git a/src/gametype.h b/src/gametype.h index a6d6b0c..98d360a 100644 --- a/src/gametype.h +++ b/src/gametype.h @@ -1,6 +1,7 @@ /* * Copyright © 2025 Michael Smith * Copyright © 2023 Willian Henrique + * Copyright © 2025 Hayden K * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -53,7 +54,7 @@ extern u32 _gametype_tag; /* games needing version-specific stuff */ #define _gametype_tag_Portal1_3420 (1 << 17) -#define _gametype_tag_L4D2_2147plus (1 << 18) +#define _gametype_tag_L4D2_2125plus (1 << 18) #define _gametype_tag_TheLastStand (1 << 19) /* The JAiZ update */ /* Matches for any multiple possible tags */ diff --git a/src/l4daddon.c b/src/l4daddon.c index 19c7a2f..30f68eb 100644 --- a/src/l4daddon.c +++ b/src/l4daddon.c @@ -35,7 +35,7 @@ #include "x86util.h" FEATURE("Left 4 Dead 2 addon bugfixes") -GAMESPECIFIC(L4D2_2147plus) +GAMESPECIFIC(L4D2_2125plus) REQUIRE_GAMEDATA(vtidx_ManageAddonsForActiveSession) REQUIRE_GLOBAL(engclient) -- cgit v1.2.3-54-g00ecf