Prevent workshop prefix from showing in nominations results menu (#1737)
Prevents workshop prefixes from being shown instead of the display names in results menus when items are disabled
This commit is contained in:
parent
5292721f0b
commit
92fc27f67f
@ -245,7 +245,11 @@ public Action Command_Nominate(int client, int args)
|
||||
for (int i = 0; i < results.Length; i++)
|
||||
{
|
||||
g_MapList.GetString(results.Get(i), mapResult, sizeof(mapResult));
|
||||
menu.AddItem(mapResult, mapResult);
|
||||
|
||||
char displayName[PLATFORM_MAX_PATH];
|
||||
GetMapDisplayName(mapResult, displayName, sizeof(displayName));
|
||||
|
||||
menu.AddItem(mapResult, displayName);
|
||||
}
|
||||
|
||||
menu.Display(client, 30);
|
||||
@ -472,21 +476,24 @@ public int MenuHandler_MapSelect(Menu menu, MenuAction action, int param1, int p
|
||||
|
||||
if ((status & MAPSTATUS_DISABLED) == MAPSTATUS_DISABLED)
|
||||
{
|
||||
char displayName[PLATFORM_MAX_PATH];
|
||||
GetMapDisplayName(mapname, displayName, sizeof(displayName));
|
||||
|
||||
if ((status & MAPSTATUS_EXCLUDE_CURRENT) == MAPSTATUS_EXCLUDE_CURRENT)
|
||||
{
|
||||
Format(mapname, sizeof(mapname), "%s (%T)", mapname, "Current Map", param1);
|
||||
Format(mapname, sizeof(mapname), "%s (%T)", displayName, "Current Map", param1);
|
||||
return RedrawMenuItem(mapname);
|
||||
}
|
||||
|
||||
if ((status & MAPSTATUS_EXCLUDE_PREVIOUS) == MAPSTATUS_EXCLUDE_PREVIOUS)
|
||||
{
|
||||
Format(mapname, sizeof(mapname), "%s (%T)", mapname, "Recently Played", param1);
|
||||
Format(mapname, sizeof(mapname), "%s (%T)", displayName, "Recently Played", param1);
|
||||
return RedrawMenuItem(mapname);
|
||||
}
|
||||
|
||||
if ((status & MAPSTATUS_EXCLUDE_NOMINATED) == MAPSTATUS_EXCLUDE_NOMINATED)
|
||||
{
|
||||
Format(mapname, sizeof(mapname), "%s (%T)", mapname, "Nominated", param1);
|
||||
Format(mapname, sizeof(mapname), "%s (%T)", displayName, "Nominated", param1);
|
||||
return RedrawMenuItem(mapname);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user