mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 13:51:31 +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
|
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)
|
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.
|
// 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)
|
// 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);
|
Discord_UpdatePresence(&discordPresence);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
#ifdef DEVELOP
|
#ifdef DEVELOP
|
||||||
// This way, we can use the invite feature in-dev, but not have snoopers seeing any potential secrets! :P
|
// This way, we can use the invite feature in-dev, but not have snoopers seeing any potential secrets! :P
|
||||||
discordPresence.largeImageKey = "miscdevelop";
|
discordPresence.largeImageKey = "miscdevelop";
|
||||||
discordPresence.largeImageText = "No peeking!";
|
discordPresence.largeImageText = "No peeking!";
|
||||||
discordPresence.state = "Testing the game";
|
discordPresence.state = "Testing the game";
|
||||||
|
|
||||||
|
DRPC_EmptyRequests();
|
||||||
Discord_UpdatePresence(&discordPresence);
|
Discord_UpdatePresence(&discordPresence);
|
||||||
return;
|
return;
|
||||||
#endif // DEVELOP
|
#endif // DEVELOP
|
||||||
*/
|
|
||||||
|
|
||||||
// Server info
|
// Server info
|
||||||
if (netgame)
|
if (netgame)
|
||||||
|
@ -710,11 +725,7 @@ void DRPC_UpdatePresence(void)
|
||||||
if (joinSecretSet == false)
|
if (joinSecretSet == false)
|
||||||
{
|
{
|
||||||
// Not able to join? Flush the request list, if it exists.
|
// Not able to join? Flush the request list, if it exists.
|
||||||
while (discordRequestList != NULL)
|
DRPC_EmptyRequests();
|
||||||
{
|
|
||||||
Discord_Respond(discordRequestList->userID, DISCORD_REPLY_IGNORE);
|
|
||||||
DRPC_RemoveRequest(discordRequestList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Discord_UpdatePresence(&discordPresence);
|
Discord_UpdatePresence(&discordPresence);
|
||||||
|
|
Loading…
Reference in a new issue