mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-09 23:02:01 +00:00
Finish DEVELOP mode functionality
This commit is contained in:
parent
720eced665
commit
585cb1cfe3
1 changed files with 18 additions and 7 deletions
|
@ -473,6 +473,21 @@ static const char *DRPC_GetServerIP(void)
|
|||
return NULL; // Could not get your IP for whatever reason, so we cannot do Discord invites
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
void DRPC_EmptyRequests(void)
|
||||
|
||||
Empties the request list. Any existing requests
|
||||
will get an ignore reply.
|
||||
--------------------------------------------------*/
|
||||
static void DRPC_EmptyRequests(void)
|
||||
{
|
||||
while (discordRequestList != NULL)
|
||||
{
|
||||
Discord_Respond(discordRequestList->userID, DISCORD_REPLY_IGNORE);
|
||||
DRPC_RemoveRequest(discordRequestList);
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
void DRPC_UpdatePresence(void)
|
||||
|
||||
|
@ -497,21 +512,21 @@ void DRPC_UpdatePresence(void)
|
|||
{
|
||||
// User doesn't want to show their game information, so update with empty presence.
|
||||
// This just shows that they're playing SRB2Kart. (If that's too much, then they should disable game activity :V)
|
||||
DRPC_EmptyRequests();
|
||||
Discord_UpdatePresence(&discordPresence);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
#ifdef DEVELOP
|
||||
// This way, we can use the invite feature in-dev, but not have snoopers seeing any potential secrets! :P
|
||||
discordPresence.largeImageKey = "miscdevelop";
|
||||
discordPresence.largeImageText = "No peeking!";
|
||||
discordPresence.state = "Testing the game";
|
||||
|
||||
DRPC_EmptyRequests();
|
||||
Discord_UpdatePresence(&discordPresence);
|
||||
return;
|
||||
#endif // DEVELOP
|
||||
*/
|
||||
|
||||
// Server info
|
||||
if (netgame)
|
||||
|
@ -710,11 +725,7 @@ void DRPC_UpdatePresence(void)
|
|||
if (joinSecretSet == false)
|
||||
{
|
||||
// Not able to join? Flush the request list, if it exists.
|
||||
while (discordRequestList != NULL)
|
||||
{
|
||||
Discord_Respond(discordRequestList->userID, DISCORD_REPLY_IGNORE);
|
||||
DRPC_RemoveRequest(discordRequestList);
|
||||
}
|
||||
DRPC_EmptyRequests();
|
||||
}
|
||||
|
||||
Discord_UpdatePresence(&discordPresence);
|
||||
|
|
Loading…
Reference in a new issue