New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discord RPC tweaks (from nightly feedback) #3205
Conversation
Also fixes some edge cases where the rich presence won't be displayed properly (after enabling it for the first time, or when disconnecting from a server)
Probably should refactor all this Discord code to not use Hungarian notation tbh
This will allow servers to revert to using the built-in/default states
Very creative with the unique default states! Good job |
We handle presence state updates primarily in CClientGame::DoPulsePostFrame() now
Requires moving to Client Deathmatch due to Game SA not supporting C++17
} | ||
|
||
zoneName = (zoneName == "Unknown") ? "Area 51" : zoneName; | ||
discordState = useZoneName ? SString(std::string(discordState + " %s").c_str(), zoneName.c_str()) : discordState; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to append a zone name
if (useZoneName)
discordState.append(" " + zoneName);
{ | ||
std::srand(GetTickCount64_()); | ||
int index = (std::rand() % stateCount); | ||
auto taskState = taskStates[index]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use a reference here to avoid unnecessary STaskState struct copy.
This PR is no more relevant due to #3216. |
Closed by ef26810 |
bool setDiscordRichPresenceStartTime(int seconds)
bool setDiscordRichPresenceEndTime(int seconds)
bool setDiscordRichPresencePartySize(int size, int max)
Walking around <zone name>
<prefix> <zone name>
- e.g:Flying around Los Santos
In a ditch
,En-route to hospital
,Meeting their maker
,Regretting their decisions
,Wasted
mtasa-blue/Client/mods/deathmatch/logic/CClientTask.h
Lines 36 to 54 in a5e70f5
Easter egg: when zone name is "Unknown" (out of normal SA bounds) it will show as Area 51 馃懡