From 25838ab4eb1fc94f59186cb24b75f440f9062f9a Mon Sep 17 00:00:00 2001 From: Hayden K Date: Mon, 7 Apr 2025 16:18:35 -0400 Subject: Fix the infamous Swamp Fever "god mode glitch" Turns out this was fixed in version 2112 (October 2012), so it was fairly easy to isolate in Ghidra (I had previously thought this was fixed by TLS). The CDirector::FinaleEscapeState member is used in CDirector::IsFinaleWon (and maybe another function, I don't remember). Prior to Valve's fix, the value was never reset to 0 after finishing a campaign, so when the Swamp (or Crash Course) "minifinale" events ran, the game would behave as though the player was entering the end-of-finale cutscene and block votes, make players invincible etc. 2112 fixed this bug by setting the member back to 0 in CDirector::Reset, so here we just set it to 0 when quickreset is used, since that is essentially the recommended way to start a run at this point. Now co-op hosts won't need to restart their game after finishing a campaign anymore! --- gamedata/gamelib.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gamedata/gamelib.txt') diff --git a/gamedata/gamelib.txt b/gamedata/gamelib.txt index 615ecf4..486a216 100644 --- a/gamedata/gamelib.txt +++ b/gamedata/gamelib.txt @@ -42,6 +42,8 @@ vtidx_GameShutdown 7 vtidx_OnGameplayStart L4D2 11 # note: just happens to be the same on linux! L4D1 11 +off_FinaleEscapeState + L4D2 164 # only currently needed for 2000-2111 to fix the swamp 1 bug # CInput vtidx_CreateMove 3 -- cgit v1.2.3-54-g00ecf