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:
parent
a86f386f12
commit
5849a0d2e2
@ -521,30 +521,27 @@ CreateNextVote()
|
|||||||
}
|
}
|
||||||
|
|
||||||
decl String:map[32];
|
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))
|
if (GetConVarInt(g_Cvar_ExcludeMaps) && GetArraySize(tempMaps) > GetConVarInt(g_Cvar_ExcludeMaps))
|
||||||
{
|
{
|
||||||
for (new i = 0; i < GetArraySize(g_OldMapList); i++)
|
for (new i = 0; i < GetArraySize(g_OldMapList); i++)
|
||||||
{
|
{
|
||||||
GetArrayString(g_OldMapList, i, map, sizeof(map));
|
GetArrayString(g_OldMapList, i, map, sizeof(map));
|
||||||
new index = FindStringInArray(tempMaps, map);
|
index = FindStringInArray(tempMaps, map);
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
RemoveFromArray(tempMaps, index);
|
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));
|
new limit = (GetConVarInt(g_Cvar_IncludeMaps) < GetArraySize(tempMaps) ? GetConVarInt(g_Cvar_IncludeMaps) : GetArraySize(tempMaps));
|
||||||
for (new i = 0; i < limit; i++)
|
for (new i = 0; i < limit; i++)
|
||||||
|
@ -344,6 +344,13 @@ public Action:Timer_StartRTV(Handle:timer)
|
|||||||
|
|
||||||
new Handle:tempMaps = CloneArray(g_MapList);
|
new Handle:tempMaps = CloneArray(g_MapList);
|
||||||
decl String:map[32];
|
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
|
// 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++)
|
for (new i = 0; i < GetArraySize(g_RTVMapList); i++)
|
||||||
@ -351,7 +358,7 @@ public Action:Timer_StartRTV(Handle:timer)
|
|||||||
GetArrayString(g_RTVMapList, i, map, sizeof(map));
|
GetArrayString(g_RTVMapList, i, map, sizeof(map));
|
||||||
AddMenuItem(MapVoteMenu, map, map);
|
AddMenuItem(MapVoteMenu, map, map);
|
||||||
|
|
||||||
new index = FindStringInArray(tempMaps, map);
|
index = FindStringInArray(tempMaps, map);
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
RemoveFromArray(tempMaps, index);
|
RemoveFromArray(tempMaps, index);
|
||||||
|
Loading…
Reference in New Issue
Block a user