Skip to content

Commit a0ce68f

Browse files
authored
Increment BitStream version for Discord update (#1330)
1 parent 0b14837 commit a0ce68f

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

Client/mods/deathmatch/logic/CClientGame.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ bool CClientGame::StartGame(const char* szNick, const char* szPassword, eServerT
631631
std::string strUser;
632632
pBitStream->Write(strUser.c_str(), MAX_SERIAL_LENGTH);
633633

634-
if (g_pNet->GetServerBitStreamVersion() >= 0x06D)
634+
if (g_pNet->GetServerBitStreamVersion() >= 0x06E)
635635
{
636636
SString joinSecret = SStringX(szSecret);
637637
pBitStream->WriteString<uchar>(joinSecret);
@@ -6954,7 +6954,7 @@ void CClientGame::RestreamModel(unsigned short usModel)
69546954

69556955
void CClientGame::TriggerDiscordJoin(SString strSecret)
69566956
{
6957-
if (g_pNet->GetServerBitStreamVersion() < 0x06D)
6957+
if (g_pNet->GetServerBitStreamVersion() < 0x06E)
69586958
return;
69596959

69606960
NetBitStreamInterface* pBitStream = g_pNet->AllocateNetBitStream();
@@ -7108,7 +7108,7 @@ void CClientGame::UpdateDiscordState()
71087108
uint playerSlot = g_pClientGame->GetServerInfo()->GetMaxPlayers();
71097109
SString state(std::to_string(playerCount));
71107110

7111-
if (g_pCore->GetNetwork()->GetServerBitStreamVersion() >= 0x06D)
7111+
if (g_pCore->GetNetwork()->GetServerBitStreamVersion() >= 0x06E)
71127112
state += "/" + std::to_string(playerSlot);
71137113

71147114
state += (playerCount == 1 && (!playerSlot || playerSlot == 1) ? " Player" : " Players");

Client/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
#define _NETCODE_VERSION_BRANCH_ID 0x4 // Use 0x1 - 0xF to indicate an incompatible branch is being used (0x0 is reserved, 0x4 is trunk)
7575
#define _CLIENT_NET_MODULE_VERSION 0x0AB // (0x000 - 0xfff) Lvl9 wizards only
7676
#define _NETCODE_VERSION 0x1DA // (0x000 - 0xfff) Increment when net messages change (pre-release)
77-
#define MTA_DM_BITSTREAM_VERSION 0x06D // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).
77+
#define MTA_DM_BITSTREAM_VERSION 0x06E // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).
7878

7979
// To avoid user confusion, make sure the ASE version matches only if communication is possible
8080
#if defined(MTA_DM_CONNECT_TO_PUBLIC)

Server/mods/deathmatch/logic/CGame.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ void CGame::JoinPlayer(CPlayer& Player)
12381238
marker.Set("CPlayerJoinCompletePacket");
12391239

12401240
// Sync up server info on entry
1241-
if (Player.GetBitStreamVersion() >= 0x06D)
1241+
if (Player.GetBitStreamVersion() >= 0x06E)
12421242
Player.Send(CServerInfoSyncPacket(SERVER_INFO_FLAG_ALL));
12431243

12441244
// Add debug info if wanted

Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3312,7 +3312,7 @@ bool CStaticFunctionDefinitions::SetPlayerDiscordJoinParams(CElement* pElement,
33123312
{
33133313
CPlayer* pPlayer = static_cast<CPlayer*>(pElement);
33143314

3315-
if (pPlayer->GetBitStreamVersion() < 0x06D)
3315+
if (pPlayer->GetBitStreamVersion() < 0x06E)
33163316
return false;
33173317

33183318
CBitStream bitStream;

Server/mods/deathmatch/logic/packets/CPlayerJoinDataPacket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ bool CPlayerJoinDataPacket::Read(NetBitStreamInterface& BitStream)
3131
m_strNick = *m_strNick;
3232
m_strSerialUser = *m_strSerialUser;
3333

34-
if (m_usBitStreamVersion >= 0x06D)
34+
if (m_usBitStreamVersion >= 0x06E)
3535
{
3636
if (!BitStream.ReadString<uchar>(m_strDiscordSecret))
3737
return false;

Server/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
#define _NETCODE_VERSION_BRANCH_ID 0x4 // Use 0x1 - 0xF to indicate an incompatible branch is being used (0x0 is reserved, 0x4 is trunk)
7878
#define _SERVER_NET_MODULE_VERSION 0x0AB // (0x000 - 0xfff) Lvl9 wizards only
7979
#define _NETCODE_VERSION 0x1DA // (0x000 - 0xfff) Increment when net messages change (pre-release)
80-
#define MTA_DM_BITSTREAM_VERSION 0x06D // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).
80+
#define MTA_DM_BITSTREAM_VERSION 0x06E // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).
8181

8282
// To avoid user confusion, make sure the ASE version matches only if communication is possible
8383
#if defined(MTA_DM_CONNECT_FROM_PUBLIC)

0 commit comments

Comments
 (0)