Skip to content

Commit c301c28

Browse files
committed
Update discord_integration.cpp
1 parent a7f5689 commit c301c28

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

cl_dll/discord_integration.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,17 @@
1111
#include "cl_util.h"
1212
#include "vgui_TeamFortressViewport.h"
1313
#include "discord_integration.h"
14+
#include "achievement_manager.h"
1415

1516
using namespace std::literals::string_literals;
1617

1718
static char s_largeImageKey[64];
1819

20+
bool IsBeta()
21+
{
22+
return SteamUtils()->GetAppID() == 3903990;
23+
}
24+
1925
namespace discord_integration
2026
{
2127
namespace
@@ -25,13 +31,15 @@ namespace discord_integration
2531
constexpr const char CLIENT_ID[] = "1381646338604667072"; // Halo: GoldSource
2632
#else
2733
constexpr const char CLIENT_ID[] = "836328170360799284";
34+
constexpr const char BETA_ID[] = "1465161235669454944";
2835
#endif
2936

3037
#ifdef _HALO
3138
// This seems to be consistent across PCs.
3239
constexpr const char STEAM_APP_ID[] = "11600264564054163526";
3340
#else
3441
// Half-Life: Cross Product Steam App ID
42+
constexpr const char BETA_APP_ID[] = "3903990";
3543
constexpr const char STEAM_APP_ID[] = "3416640";
3644
#endif
3745

@@ -420,7 +428,10 @@ namespace discord_integration
420428
handlers.disconnected = handle_disconnected;
421429
handlers.joinGame = handle_joinGame;
422430
handlers.joinRequest = handle_joinRequest;
423-
Discord_Initialize(CLIENT_ID, &handlers, 1, STEAM_APP_ID);
431+
if (IsBeta())
432+
Discord_Initialize(BETA_ID, &handlers, 1, BETA_APP_ID);
433+
else
434+
Discord_Initialize(CLIENT_ID, &handlers, 1, STEAM_APP_ID);
424435

425436
discord_state = std::make_unique<DiscordState>();
426437

0 commit comments

Comments
 (0)