Skip to content

Commit

Permalink
Hotfix Discord-RPC from nightly Feedbacks (#3220)
Browse files Browse the repository at this point in the history
* Fix showing random values in state
* Reset only possible after setting a custom app ID
  • Loading branch information
znvjder committed Oct 24, 2023
1 parent e65776c commit d7fb4cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Client/core/CDiscordRichPresence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ void CDiscordRichPresence::SetDefaultData()

m_uiDiscordAppStart = 0;
m_uiDiscordAppEnd = 0;

m_iPartySize = 0;
m_iPartyMax = 0;
}

void CDiscordRichPresence::UpdatePresence()
Expand Down
8 changes: 7 additions & 1 deletion Client/mods/deathmatch/logic/luadefs/CLuaDiscordDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ bool CLuaDiscordDefs::ResetData()
{
auto discord = g_pCore->GetDiscord();

if (!discord || !discord->IsDiscordRPCEnabled() || !discord->ResetDiscordData())
if (!discord || !discord->IsDiscordRPCEnabled())
return false;

if (discord->IsDiscordCustomDetailsDisallowed())
return false;

if (!discord->ResetDiscordData())
return false;

return true;
Expand Down

0 comments on commit d7fb4cf

Please sign in to comment.