Skip to content

Commit 4ac482f

Browse files
committed
Update confoglcompmod
- Get rid of l4d2_changelevel code. - Change ServerCommand to ForceChangeLevel.
1 parent aee62c9 commit 4ac482f

3 files changed

Lines changed: 1 addition & 24 deletions

File tree

-397 Bytes
Binary file not shown.

addons/sourcemod/scripting/confoglcompmod.sp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
#include <sdkhooks>
3333
#include <left4dhooks>
3434
#include <colors>
35-
#undef REQUIRE_PLUGIN
36-
#include <l4d2_changelevel>
3735
//#include <l4d2lib> //ItemTracking (commented out)
3836

3937
#include "confoglcompmod/includes/constants.sp"

addons/sourcemod/scripting/confoglcompmod/ReqMatch.sp

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ static bool
1616
RM_bIsAMatchActive = false,
1717
RM_bIsPluginsLoaded = false,
1818
RM_bIsMapRestarted = false,
19-
RM_bIsChangeLevelAvailable = false,
2019
RM_bIsChmatchRequest = false;
2120

2221
static Handle
@@ -43,22 +42,6 @@ void RM_APL()
4342
CreateNative("LGO_IsMatchModeLoaded", native_IsMatchModeLoaded);
4443
}
4544

46-
public void OnLibraryAdded(const char[] name)
47-
{
48-
if (strcmp(name, "l4d2_changelevel") == 0)
49-
{
50-
RM_bIsChangeLevelAvailable = true;
51-
}
52-
}
53-
54-
public void OnLibraryRemoved(const char[] name)
55-
{
56-
if (strcmp(name, "l4d2_changelevel") == 0)
57-
{
58-
RM_bIsChangeLevelAvailable = false;
59-
}
60-
}
61-
6245
void RM_OnModuleStart()
6346
{
6447
RM_hDoRestart = CreateConVarEx("match_restart", "1", "Sets whether the plugin will restart the map upon match mode being forced or requested", _, true, 0.0, true, 1.0);
@@ -102,9 +85,6 @@ void RM_OnModuleStart()
10285
RM_hReloaded.SetInt(0);
10386
RM_Match_Load();
10487
}
105-
106-
// ChangeLevel
107-
RM_bIsChangeLevelAvailable = LibraryExists("l4d2_changelevel");
10888
}
10989

11090
void RM_OnMapStart()
@@ -307,8 +287,7 @@ static Action RM_Match_MapRestart_Timer(Handle hTimer, DataPack hDp)
307287
hDp.Reset();
308288
hDp.ReadString(sMap, sizeof(sMap));
309289

310-
if (RM_bIsChangeLevelAvailable) L4D2_ChangeLevel(sMap);
311-
else ServerCommand("changelevel %s", sMap);
290+
ForceChangeLevel(sMap, "Match restart");
312291

313292
RM_bIsMapRestarted = true;
314293

0 commit comments

Comments
 (0)