nominate_removemap should now remove every instance of the same nominated map

This commit is contained in:
jenz 2026-01-06 22:17:12 +01:00
parent 9527c5bc9b
commit 9606606baf

View File

@ -2279,6 +2279,8 @@ public int Native_NominateMap(Handle plugin, int numParams)
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 i = 0; i < GetArraySize(g_NominateList[client]); i++)
@ -2300,13 +2302,13 @@ bool InternalRemoveNominationByMap(char[] map)
g_NominateReservedCount--;
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); */