forked from UNLOZE/sm-plugins
MapChooser: Cleanup some dumb stuff.
This commit is contained in:
@@ -104,9 +104,9 @@ public void OnMapStart()
|
||||
/* Handle late load */
|
||||
for (int i=1; i<=MaxClients; i++)
|
||||
{
|
||||
if (IsClientConnected(i))
|
||||
if (IsClientInGame(i))
|
||||
{
|
||||
OnClientConnected(i);
|
||||
OnClientPutInServer(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public void OnMapTimeLeftChanged()
|
||||
SetupTimeOverTimer();
|
||||
}
|
||||
|
||||
public void OnClientConnected(int client)
|
||||
public void OnClientPutInServer(int client)
|
||||
{
|
||||
UpdateRTV();
|
||||
}
|
||||
@@ -156,7 +156,7 @@ void UpdateRTV()
|
||||
{
|
||||
g_Voters = 0;
|
||||
|
||||
for (int i=1; i<=MAXPLAYERS; i++)
|
||||
for (int i=1; i<=MaxClients; i++)
|
||||
{
|
||||
if (IsClientInGame(i) && !IsFakeClient(i))
|
||||
{
|
||||
@@ -222,25 +222,25 @@ void AttemptRTV(int client)
|
||||
{
|
||||
if (!g_RTVAllowed || (g_Cvar_RTVPostVoteAction.IntValue == 1 && HasEndOfMapVoteFinished()))
|
||||
{
|
||||
ReplyToCommand(client, "[SM] %t", "RTV Not Allowed");
|
||||
ReplyToCommand(client, "[RTVE] %t", "RTV Not Allowed");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CanMapChooserStartVote())
|
||||
{
|
||||
ReplyToCommand(client, "[SM] %t", "RTV Started");
|
||||
ReplyToCommand(client, "[RTVE] %t", "RTV Started");
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetClientCount(true) < g_Cvar_MinPlayers.IntValue)
|
||||
{
|
||||
ReplyToCommand(client, "[SM] %t", "Minimal Players Not Met");
|
||||
ReplyToCommand(client, "[RTVE] %t", "Minimal Players Not Met");
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_Voted[client])
|
||||
{
|
||||
ReplyToCommand(client, "[SM] %t", "Already Voted", g_Votes, g_VotesNeeded);
|
||||
ReplyToCommand(client, "[RTVE] %t", "Already Voted", g_Votes, g_VotesNeeded);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ void AttemptRTV(int client)
|
||||
g_Votes++;
|
||||
g_Voted[client] = true;
|
||||
|
||||
PrintToChatAll("[SM] %t", "RTV Requested", name, g_Votes, g_VotesNeeded);
|
||||
PrintToChatAll("[RTVE] %t", "RTV Requested", name, g_Votes, g_VotesNeeded);
|
||||
|
||||
if (g_Votes >= g_VotesNeeded)
|
||||
{
|
||||
@@ -278,7 +278,7 @@ void StartRTV()
|
||||
{
|
||||
GetMapDisplayName(map, map, sizeof(map));
|
||||
|
||||
PrintToChatAll("[SM] %t", "Changing Maps", map);
|
||||
PrintToChatAll("[RTVE] %t", "Changing Maps", map);
|
||||
CreateTimer(5.0, Timer_ChangeMap, _, TIMER_FLAG_NO_MAPCHANGE);
|
||||
g_InChange = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user