mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
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:
commit
635c038015
1 changed files with 16 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue