nominate_removemap should now remove every instance of the same nominated map
This commit is contained in:
parent
9527c5bc9b
commit
9606606baf
@ -2279,6 +2279,8 @@ public int Native_NominateMap(Handle plugin, int numParams)
|
|||||||
|
|
||||||
bool InternalRemoveNominationByMap(char[] map)
|
bool InternalRemoveNominationByMap(char[] map)
|
||||||
{
|
{
|
||||||
|
//this seems only to be used by the admin command nominate_removemap, hence it will now exhaust every nomination for a specific map instead of a single one.
|
||||||
|
bool removed_at_least_once = false;
|
||||||
for (int client = 0; client < MaxClients; client++)
|
for (int client = 0; client < MaxClients; client++)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < GetArraySize(g_NominateList[client]); i++)
|
for(int i = 0; i < GetArraySize(g_NominateList[client]); i++)
|
||||||
@ -2300,13 +2302,13 @@ bool InternalRemoveNominationByMap(char[] map)
|
|||||||
g_NominateReservedCount--;
|
g_NominateReservedCount--;
|
||||||
|
|
||||||
RemoveFromArray(g_NominateList[client], i);
|
RemoveFromArray(g_NominateList[client], i);
|
||||||
RemoveFromArray(g_NominateOwners, i);
|
RemoveFromArray(g_NominateOwners, i); //maybe this is only meant to be done once?
|
||||||
|
|
||||||
return true;
|
removed_at_least_once = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return removed_at_least_once;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* native bool RemoveNominationByMap(const char[] map); */
|
/* native bool RemoveNominationByMap(const char[] map); */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user