@@ -77,7 +77,7 @@ struct WebHookParams
7777{
7878 std::string title = " Unknown" ;
7979 std::string description = " *Insert Yapping Here*" ;
80- int color = EMBEDCOLOR_PLAYER ;
80+ int color = EMBED_COLOR_PLAYER ;
8181 std::string footer = " " ;
8282};
8383
@@ -212,21 +212,21 @@ void RPCState(IConVar* var, const char* pOldValue, float flOldValue)
212212{
213213 if (!g_P2MMServerPlugin.m_bPluginLoaded ) return ;
214214 ConVar* cvRPC = (ConVar*)var;
215- if (cvRPC->GetBool () && !g_pDiscordIntegration->RPCRunning )
215+ if (cvRPC->GetBool () && !g_pDiscordIntegration->rpcRunning )
216216 g_pDiscordIntegration->StartDiscordRPC ();
217- if (!cvRPC->GetBool () && g_pDiscordIntegration->RPCRunning )
217+ if (!cvRPC->GetBool () && g_pDiscordIntegration->rpcRunning )
218218 g_pDiscordIntegration->ShutdownDiscordRPC ();
219219}
220220ConVar p2mm_discord_rpc (" p2mm_discord_rpc" , " 1" , FCVAR_NONE, " Enable or disable Discord RPC with P2:MM." , true , 0 , true , 1 , RPCState);
221221
222222static DiscordRichPresence RPC;
223223CDiscordIntegration::CDiscordIntegration ()
224224{
225- this ->RPCRunning = false ; // Flag bool for whether the RPC is running.
225+ this ->rpcRunning = false ; // Flag bool for whether the RPC is running.
226226
227227 RPC.state = " " ;
228228 RPC.details = " Starting up..." ;
229- RPC.startTimestamp = time (0 );
229+ RPC.startTimestamp = time (nullptr );
230230 RPC.endTimestamp = 0 ;
231231 RPC.largeImageKey = " p2mmlogo" ;
232232 RPC.largeImageText = " Portal 2" ;
@@ -314,7 +314,7 @@ bool CDiscordIntegration::StartDiscordRPC()
314314 UpdateDiscordRPC ();
315315
316316 DiscordLog (0 , false , " Discord RPC activated!" );
317- this ->RPCRunning = true ;
317+ this ->rpcRunning = true ;
318318 return true ;
319319}
320320
@@ -326,7 +326,7 @@ void CDiscordIntegration::ShutdownDiscordRPC()
326326 DiscordLog (0 , false , " Shutting down Discord RPC..." );
327327 Discord_ClearPresence ();
328328 Discord_Shutdown ();
329- this ->RPCRunning = false ;
329+ this ->rpcRunning = false ;
330330 DiscordLog (0 , false , " Shutdown Discord RPC!" );
331331}
332332
@@ -420,6 +420,8 @@ void CDiscordIntegration::UpdateDiscordRPC()
420420
421421 V_strcat (details, map->mapname , 128 );
422422 V_strcat (smallImageKey, " coop" , 32 );
423+ // V_strcat(smallImageKey, "p2mpchapter1", 32);
424+ // V_snprintf(smallImageKey, 32, "p2mpchapter%i", map->chapter);
423425 V_strcat (smallImageText, map->chaptername , 128 );
424426 }
425427 break ;
0 commit comments