Skip to content

Commit 14ad01f

Browse files
committed
Switch to Forgetest's l4d2_fix_changelevel plugin
Replaces the old approach with an improved version that runs automatically on map changes, so no additional plugin code is needed. Plugin source: https://github.com/Target5150/MoYu_Server_Stupid_Plugins/tree/master/The%20Last%20Stand/l4d2_fix_changelevel Resolves #921, closes #943.
1 parent a8d06af commit 14ad01f

8 files changed

Lines changed: 263 additions & 229 deletions

File tree

addons/sourcemod/gamedata/l4d2_changelevel.txt

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
"Games"
2+
{
3+
"left4dead2"
4+
{
5+
"Functions"
6+
{
7+
"CVEngineServer::ChangeLevel"
8+
{
9+
"signature" "CVEngineServer::ChangeLevel"
10+
"callconv" "thiscall"
11+
"return" "void"
12+
"this" "ignore"
13+
"arguments"
14+
{
15+
"map"
16+
{
17+
"type" "charptr"
18+
}
19+
"reason"
20+
{
21+
"type" "charptr"
22+
}
23+
}
24+
}
25+
}
26+
27+
"Offsets"
28+
{
29+
"CDirector::m_mapDurationTimer"
30+
{
31+
"linux" "936"
32+
"windows" "936"
33+
}
34+
35+
"CDirector::m_flTotalMissionElaspedTime"
36+
{
37+
"linux" "944"
38+
"windows" "944"
39+
}
40+
}
41+
42+
"Addresses"
43+
{
44+
"CDirector::m_isTransitioning"
45+
{
46+
"signature" "CDirector::OnBeginTransition"
47+
"linux"
48+
{
49+
"read" "14"
50+
}
51+
"windows"
52+
{
53+
"read" "26"
54+
}
55+
}
56+
}
57+
58+
"Signatures"
59+
{
60+
"CDirector::ClearTeamScores"
61+
{
62+
"library" "server"
63+
"linux" "@_ZN9CDirector15ClearTeamScoresEb"
64+
"windows" "\x55\x8B\xEC\x56\x8B\x75\x08\x57\x8B\xF9\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9"
65+
/* 55 8B EC 56 8B 75 08 57 8B F9 8B 0D ? ? ? ? 85 C9 */
66+
}
67+
68+
"CDirector::OnBeginTransition"
69+
{
70+
"library" "server"
71+
"linux" "@_ZN9CDirector17OnBeginTransitionEb"
72+
"windows" "\x55\x8B\x2A\x2A\x2A\x2A\x80\x2A\x2A\x2A\x53\x56\x8B\x2A\x0F\x2A\x2A\x57\x8D"
73+
/* 55 8B ? ? ? ? 80 ? ? ? 53 56 8B ? 0F ? ? 57 8D */
74+
}
75+
76+
// Search string "Preparing player entities for changelevel"
77+
"CTerrorGameRules::OnBeginChangeLevel"
78+
{
79+
"library" "server"
80+
"linux" "@_ZN16CTerrorGameRules18OnBeginChangeLevelEPKc"
81+
"windows" "\x55\x8B\x2A\x56\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x2A\x8B\x2A\x2A\x8B\x2A\xFF"
82+
/* 55 8B ? 56 8B ? ? ? ? ? 8B ? 8B ? ? 8B ? FF */
83+
}
84+
85+
// Search string "VEngineServer::Changelevel with NULL s1"
86+
"CVEngineServer::ChangeLevel"
87+
{
88+
"library" "engine"
89+
"linux" "@_ZN14CVEngineServer11ChangeLevelEPKcS1_"
90+
"windows" "\x55\x8B\x2A\x2A\x2A\x2A\x2A\x2A\x2A\xA1\x2A\x2A\x2A\x2A\x2A\x2A\x89\x2A\x2A\xA1\x2A\x2A\x2A\x2A\x56\x8B\x2A\x2A\x57\x8B"
91+
/* 55 8B ? ? ? ? ? ? ? A1 ? ? ? ? ? ? 89 ? ? A1 ? ? ? ? 56 8B ? ? 57 8B */
92+
}
93+
}
94+
}
95+
}
-4.8 KB
Binary file not shown.
7.14 KB
Binary file not shown.

addons/sourcemod/scripting/include/l4d2_changelevel.inc

Lines changed: 0 additions & 33 deletions
This file was deleted.

addons/sourcemod/scripting/l4d2_changelevel.sp

Lines changed: 0 additions & 143 deletions
This file was deleted.

0 commit comments

Comments
 (0)