The current map played shouldn't appear in MapChooser votes or RTV votes now. It can still be nominated in RTV though.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401725
This commit is contained in:
Michael McKoy 2007-11-24 03:28:33 +00:00
parent a86f386f12
commit 5849a0d2e2
2 changed files with 17 additions and 13 deletions

View File

@ -521,30 +521,27 @@ CreateNextVote()
}
decl String:map[32];
new Handle:tempMaps = CloneArray(g_MapList);
new index, Handle:tempMaps = CloneArray(g_MapList);
GetCurrentMap(map, sizeof(map));
index = FindStringInArray(tempMaps, map);
if (index != -1)
{
RemoveFromArray(tempMaps, index);
}
if (GetConVarInt(g_Cvar_ExcludeMaps) && GetArraySize(tempMaps) > GetConVarInt(g_Cvar_ExcludeMaps))
{
for (new i = 0; i < GetArraySize(g_OldMapList); i++)
{
GetArrayString(g_OldMapList, i, map, sizeof(map));
new index = FindStringInArray(tempMaps, map);
index = FindStringInArray(tempMaps, map);
if (index != -1)
{
RemoveFromArray(tempMaps, index);
}
}
}
else
{
// If we didn't check against ExcludeMaps, we have to remove the current map.
GetCurrentMap(map, sizeof(map));
new index = FindStringInArray(tempMaps, map);
if (index != -1)
{
RemoveFromArray(tempMaps, index);
}
}
new limit = (GetConVarInt(g_Cvar_IncludeMaps) < GetArraySize(tempMaps) ? GetConVarInt(g_Cvar_IncludeMaps) : GetArraySize(tempMaps));
for (new i = 0; i < limit; i++)

View File

@ -345,13 +345,20 @@ public Action:Timer_StartRTV(Handle:timer)
new Handle:tempMaps = CloneArray(g_MapList);
decl String:map[32];
GetCurrentMap(map, sizeof(map));
new index = FindStringInArray(tempMaps, map);
if (index != -1)
{
RemoveFromArray(tempMaps, index);
}
// We assume that g_RTVMapList is within the correct limits, based on the logic for nominations
for (new i = 0; i < GetArraySize(g_RTVMapList); i++)
{
GetArrayString(g_RTVMapList, i, map, sizeof(map));
AddMenuItem(MapVoteMenu, map, map);
new index = FindStringInArray(tempMaps, map);
index = FindStringInArray(tempMaps, map);
if (index != -1)
{
RemoveFromArray(tempMaps, index);