made sure plugin does not need to be unloaded
This commit is contained in:
parent
be9d9dca43
commit
0e5cc3175c
@ -13,17 +13,16 @@ public Plugin myinfo =
|
||||
float g_fOrigin_Button5[3];
|
||||
Handle g_hSparkTimer;
|
||||
|
||||
bool g_bIsBoatEscape = false;
|
||||
|
||||
public void VerifyMap()
|
||||
{
|
||||
g_bIsBoatEscape = false;
|
||||
char currentMap[64];
|
||||
GetCurrentMap(currentMap, sizeof(currentMap));
|
||||
if (!StrEqual(currentMap, "ze_boatescape6_remix_fix2"))
|
||||
{
|
||||
char sFilename[256];
|
||||
GetPluginFilename(null, sFilename, sizeof(sFilename));
|
||||
ServerCommand("sm plugins unload %s", sFilename);
|
||||
}
|
||||
else
|
||||
|
||||
g_bIsBoatEscape = StrEqual(currentMap, "ze_boatescape6_remix_fix2", false);
|
||||
if (g_bIsBoatEscape)
|
||||
{
|
||||
AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.dx80.vtx");
|
||||
AddFileToDownloadsTable("models/zombieden/xmode/youmu/laser.dx90.vtx");
|
||||
@ -68,7 +67,6 @@ public void VerifyMap()
|
||||
PrecacheModel("models/props/cs_italy/orange.mdl");
|
||||
PrecacheModel("models/props_junk/watermelon01.mdl");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void OnPluginStart()
|
||||
@ -84,13 +82,17 @@ public void OnMapStart()
|
||||
}
|
||||
|
||||
public void OnRoundEnd(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||
{
|
||||
if (g_bIsBoatEscape)
|
||||
{
|
||||
delete g_hSparkTimer;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||
{
|
||||
|
||||
if (g_bIsBoatEscape)
|
||||
{
|
||||
delete g_hSparkTimer;
|
||||
SpawnSparkTimer();
|
||||
SpawnSeagullRelay();
|
||||
@ -255,6 +257,7 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||
SetVariantString("!activator");
|
||||
AcceptEntityInput(iMelonBeam, "SetParent", iRotating);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user