MapChooser: Cleanup some dumb stuff.
This commit is contained in:
parent
5075c235f8
commit
4a5ba9e986
@ -72,9 +72,9 @@ Handle g_mapTrie;
|
|||||||
|
|
||||||
// Nominations Extended Convars
|
// Nominations Extended Convars
|
||||||
Handle g_Cvar_MarkCustomMaps = INVALID_HANDLE;
|
Handle g_Cvar_MarkCustomMaps = INVALID_HANDLE;
|
||||||
|
|
||||||
Handle g_Cvar_NominateDelay = INVALID_HANDLE;
|
Handle g_Cvar_NominateDelay = INVALID_HANDLE;
|
||||||
Handle g_Cvar_InitialDelay = INVALID_HANDLE;
|
Handle g_Cvar_InitialDelay = INVALID_HANDLE;
|
||||||
|
|
||||||
int g_Player_NominationDelay[MAXPLAYERS+1];
|
int g_Player_NominationDelay[MAXPLAYERS+1];
|
||||||
int g_NominationDelay;
|
int g_NominationDelay;
|
||||||
|
|
||||||
@ -534,7 +534,7 @@ public Action Command_Nominate(int client, int args)
|
|||||||
if(result == Nominate_AlreadyInVote)
|
if(result == Nominate_AlreadyInVote)
|
||||||
CPrintToChat(client, "[NE] %t", "Map Already In Vote", mapname);
|
CPrintToChat(client, "[NE] %t", "Map Already In Vote", mapname);
|
||||||
else if(result == Nominate_VoteFull)
|
else if(result == Nominate_VoteFull)
|
||||||
CPrintToChat(client, "[ME] %t", "Max Nominations");
|
CPrintToChat(client, "[NE] %t", "Max Nominations");
|
||||||
|
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
@ -856,7 +856,7 @@ stock bool IsNominateAllowed(int client)
|
|||||||
{
|
{
|
||||||
case CanNominate_No_VoteInProgress:
|
case CanNominate_No_VoteInProgress:
|
||||||
{
|
{
|
||||||
CReplyToCommand(client, "[ME] %t", "Nextmap Voting Started");
|
CReplyToCommand(client, "[NE] %t", "Nextmap Voting Started");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -870,7 +870,7 @@ stock bool IsNominateAllowed(int client)
|
|||||||
/*
|
/*
|
||||||
case CanNominate_No_VoteFull:
|
case CanNominate_No_VoteFull:
|
||||||
{
|
{
|
||||||
CReplyToCommand(client, "[ME] %t", "Max Nominations");
|
CReplyToCommand(client, "[NE] %t", "Max Nominations");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
@ -104,9 +104,9 @@ public void OnMapStart()
|
|||||||
/* Handle late load */
|
/* Handle late load */
|
||||||
for (int i=1; i<=MaxClients; i++)
|
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();
|
SetupTimeOverTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnClientConnected(int client)
|
public void OnClientPutInServer(int client)
|
||||||
{
|
{
|
||||||
UpdateRTV();
|
UpdateRTV();
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ void UpdateRTV()
|
|||||||
{
|
{
|
||||||
g_Voters = 0;
|
g_Voters = 0;
|
||||||
|
|
||||||
for (int i=1; i<=MAXPLAYERS; i++)
|
for (int i=1; i<=MaxClients; i++)
|
||||||
{
|
{
|
||||||
if (IsClientInGame(i) && !IsFakeClient(i))
|
if (IsClientInGame(i) && !IsFakeClient(i))
|
||||||
{
|
{
|
||||||
@ -222,25 +222,25 @@ void AttemptRTV(int client)
|
|||||||
{
|
{
|
||||||
if (!g_RTVAllowed || (g_Cvar_RTVPostVoteAction.IntValue == 1 && HasEndOfMapVoteFinished()))
|
if (!g_RTVAllowed || (g_Cvar_RTVPostVoteAction.IntValue == 1 && HasEndOfMapVoteFinished()))
|
||||||
{
|
{
|
||||||
ReplyToCommand(client, "[SM] %t", "RTV Not Allowed");
|
ReplyToCommand(client, "[RTVE] %t", "RTV Not Allowed");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CanMapChooserStartVote())
|
if (!CanMapChooserStartVote())
|
||||||
{
|
{
|
||||||
ReplyToCommand(client, "[SM] %t", "RTV Started");
|
ReplyToCommand(client, "[RTVE] %t", "RTV Started");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetClientCount(true) < g_Cvar_MinPlayers.IntValue)
|
if (GetClientCount(true) < g_Cvar_MinPlayers.IntValue)
|
||||||
{
|
{
|
||||||
ReplyToCommand(client, "[SM] %t", "Minimal Players Not Met");
|
ReplyToCommand(client, "[RTVE] %t", "Minimal Players Not Met");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_Voted[client])
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,7 +250,7 @@ void AttemptRTV(int client)
|
|||||||
g_Votes++;
|
g_Votes++;
|
||||||
g_Voted[client] = true;
|
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)
|
if (g_Votes >= g_VotesNeeded)
|
||||||
{
|
{
|
||||||
@ -278,7 +278,7 @@ void StartRTV()
|
|||||||
{
|
{
|
||||||
GetMapDisplayName(map, map, sizeof(map));
|
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);
|
CreateTimer(5.0, Timer_ChangeMap, _, TIMER_FLAG_NO_MAPCHANGE);
|
||||||
g_InChange = true;
|
g_InChange = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user