Merge branch 'drpc-maps-again' into 'master'

Bring back map images for Discord Rich Presence

See merge request kart-krew-dev/ring-racers-internal!2412
This commit is contained in:
SteelT 2025-08-25 19:55:12 -04:00
commit 635c038015

View file

@ -950,6 +950,22 @@ void DRPC_UpdatePresence(void)
}
}
if ((gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_CEREMONY) && !demo.attract)
{
// Try a map image, if it exists!
if (gamemap-1 < basenummapheaders)
{
snprintf(largeimg, 128, "%smap_%s%s", IMAGE_REPO, G_BuildMapName(gamemap), IMAGE_EXT);
discordPresence.largeImageKey = largeimg; // Map image
}
// Map name on tool tip
char *title = G_BuildMapTitle(gamemap);
snprintf(largename, 128, "Map: %s", title);
discordPresence.largeImageText = largename;
Z_Free(title);
}
// Character info
if (Playing() && playeringame[consoleplayer] && !players[consoleplayer].spectator)
{