mapchooser_extended: fix nomlist VIP/name collision

This commit is contained in:
BotoX 2019-12-22 20:52:24 +01:00
parent c63af9aa41
commit a2e4176b4a

View File

@ -764,15 +764,17 @@ bool PopulateNominateListMenu(Menu menu, int client, const char[] filter = "")
if(!filter[0] || StrContains(map, filter, false) != -1) if(!filter[0] || StrContains(map, filter, false) != -1)
{ {
int owner = GetArrayCell(OwnerList, i); strcopy(display, sizeof(display), map);
if(!owner)
Format(display, sizeof(display), "%s (Admin)", map);
else
Format(display, sizeof(display), "%s (%N)", map, owner);
bool VIPRestriction = GetMapVIPRestriction(map); bool VIPRestriction = GetMapVIPRestriction(map);
if((VIPRestriction) && AreRestrictionsActive()) if((VIPRestriction) && AreRestrictionsActive())
Format(display, sizeof(display), "%s (%T)", map, "VIP Nomination", client); Format(display, sizeof(display), "%s (%T)", display, "VIP Nomination", client);
int owner = GetArrayCell(OwnerList, i);
if(!owner)
Format(display, sizeof(display), "%s (Admin)", display);
else
Format(display, sizeof(display), "%s (%N)", display, owner);
AddMenuItem(menu, map, display); AddMenuItem(menu, map, display);
} }