From 7d0a659b37625efc7335f8712df287fac65a0740 Mon Sep 17 00:00:00 2001 From: fed <58637860+fedddddd@users.noreply.github.com> Date: Tue, 29 Nov 2022 20:37:05 +0100 Subject: [PATCH] Small fix --- src/client/component/discord.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/client/component/discord.cpp b/src/client/component/discord.cpp index ab1f241e..ff2e232c 100644 --- a/src/client/component/discord.cpp +++ b/src/client/component/discord.cpp @@ -59,7 +59,13 @@ namespace discord map = "museum"; } - const auto mapname = game::UI_SafeTranslateString(utils::string::va("PRESENCE_SP_%s", map)); + const auto key = utils::string::va("PRESENCE_SP_%s", map); + const char* mapname = map; + if (game::DB_XAssetExists(game::ASSET_TYPE_LOCALIZE, key) && !game::DB_IsXAssetDefault(game::ASSET_TYPE_LOCALIZE, key)) + { + mapname = game::UI_SafeTranslateString(key); + } + discord_presence.largeImageKey = map; if (details.has_value())