MakoVote: slight improvements
This commit is contained in:
parent
7f5635ac02
commit
58e45c6f38
@ -40,9 +40,6 @@ public void OnMapStart()
|
||||
{
|
||||
VerifyMap();
|
||||
|
||||
PrecacheSound("#unloze/Pendulum - Witchcraft.mp3", true);
|
||||
AddFileToDownloadsTable("sound/unloze/Pendulum - Witchcraft.mp3");
|
||||
|
||||
bStartVoteNextRound = false;
|
||||
|
||||
for (int i = 0; i <= (NUMBEROFSTAGES - 1); i++)
|
||||
@ -59,14 +56,17 @@ public Action VerifyMap()
|
||||
GetPluginFilename(INVALID_HANDLE, sFilename, sizeof(sFilename));
|
||||
ServerCommand("sm plugins unload %s", sFilename);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddFileToDownloadsTable("sound/unloze/Pendulum - Witchcraft.mp3");
|
||||
PrecacheSound("#unloze/Pendulum - Witchcraft.mp3", true);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnEntityCreated(int iEntity, const char[] sClassname)
|
||||
{
|
||||
if (IsValidEntity(iEntity))
|
||||
{
|
||||
SDKHook(iEntity, SDKHook_SpawnPost, OnEntitySpawned);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnEntitySpawned(int iEntity)
|
||||
@ -80,9 +80,7 @@ public void OnEntitySpawned(int iEntity)
|
||||
GetEdictClassname(iEntity, sClassname, sizeof(sClassname));
|
||||
|
||||
if ((strcmp(sTargetname, "espad") != 0) && (strcmp(sTargetname, "ss_slow") != 0) && (strcmp(sClassname, "ambient_generic") == 0))
|
||||
{
|
||||
AcceptEntityInput(iEntity, "Kill");
|
||||
}
|
||||
}
|
||||
|
||||
public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||
@ -281,11 +279,11 @@ public void InitiateVote()
|
||||
char sBuffer[128];
|
||||
GetArrayString(g_StageList, i, sBuffer, sizeof(sBuffer));
|
||||
|
||||
for (int i = 0; i <= (NUMBEROFSTAGES - 1); i++)
|
||||
for (int j = 0; j <= (NUMBEROFSTAGES - 1); j++)
|
||||
{
|
||||
if (strcmp(sBuffer, g_sStageName[i]) == 0)
|
||||
if (strcmp(sBuffer, g_sStageName[j]) == 0)
|
||||
{
|
||||
if (g_bOnCooldown[i])
|
||||
if (g_bOnCooldown[j])
|
||||
AddMenuItem(g_VoteMenu, sBuffer, sBuffer, ITEMDRAW_DISABLED);
|
||||
else
|
||||
AddMenuItem(g_VoteMenu, sBuffer, sBuffer);
|
||||
|
Loading…
Reference in New Issue
Block a user