Use display name for currentmap chat trigger (#1512)

This increases the buffer for the map to be consistent with the other calls to GetCurrentMap. Also `currentmap` now uses the map's display name similar how `nextmap` uses it.
This commit is contained in:
XeroX 2021-07-17 12:46:22 +02:00 committed by GitHub
parent f927455778
commit 4d6b9895d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,9 +272,9 @@ public void OnClientSayCommand_Post(int client, const char[] command, const char
} }
else if (strcmp(sArgs, "currentmap", false) == 0) else if (strcmp(sArgs, "currentmap", false) == 0)
{ {
char map[64]; char map[PLATFORM_MAX_PATH];
GetCurrentMap(map, sizeof(map)); GetCurrentMap(map, sizeof(map));
GetMapDisplayName(map, map, sizeof(map));
if (g_Cvar_TriggerShow.IntValue) if (g_Cvar_TriggerShow.IntValue)
{ {
PrintToChatAll("[SM] %t", "Current Map", map); PrintToChatAll("[SM] %t", "Current Map", map);