Skip to content

Commit 275e85e

Browse files
committed
revert(network): remove CommandID accounting from isRoomForLoadCompleteMessage and isRoomForTimeOutGameStartMessage
1 parent d1a268b commit 275e85e

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

Core/GameEngine/Source/GameNetwork/NetPacket.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2550,7 +2550,6 @@ Bool NetPacket::addTimeOutGameStartMessage(NetCommandRef *msg) {
25502550
Bool NetPacket::isRoomForTimeOutGameStartMessage(NetCommandRef *msg) {
25512551
Int len = 0;
25522552
NetCommandMsg *cmdMsg = static_cast<NetCommandMsg *>(msg->getCommand());
2553-
Bool needNewCommandID = FALSE;
25542553
if (m_lastCommandType != cmdMsg->getNetCommandType()) {
25552554
++len;
25562555
len += sizeof(UnsignedByte);
@@ -2561,13 +2560,6 @@ Bool NetPacket::isRoomForTimeOutGameStartMessage(NetCommandRef *msg) {
25612560
if (m_lastPlayerID != cmdMsg->getPlayerID()) {
25622561
++len;
25632562
len += sizeof(UnsignedByte);
2564-
needNewCommandID = TRUE;
2565-
}
2566-
2567-
// If necessary, account for the command ID of this command.
2568-
if (((m_lastCommandID + 1) != (UnsignedShort)(cmdMsg->getID())) || (needNewCommandID == TRUE)) {
2569-
len += sizeof(UnsignedByte); // NetPacketFieldTypes::CommandId
2570-
len += sizeof(UnsignedShort); // command ID value
25712563
}
25722564

25732565
++len; // for NetPacketFieldTypes::Data
@@ -2650,7 +2642,6 @@ Bool NetPacket::addLoadCompleteMessage(NetCommandRef *msg) {
26502642
Bool NetPacket::isRoomForLoadCompleteMessage(NetCommandRef *msg) {
26512643
Int len = 0;
26522644
NetCommandMsg *cmdMsg = static_cast<NetCommandMsg *>(msg->getCommand());
2653-
Bool needNewCommandID = FALSE;
26542645
if (m_lastCommandType != cmdMsg->getNetCommandType()) {
26552646
++len;
26562647
len += sizeof(UnsignedByte);
@@ -2661,13 +2652,6 @@ Bool NetPacket::isRoomForLoadCompleteMessage(NetCommandRef *msg) {
26612652
if (m_lastPlayerID != cmdMsg->getPlayerID()) {
26622653
++len;
26632654
len += sizeof(UnsignedByte);
2664-
needNewCommandID = TRUE;
2665-
}
2666-
2667-
// If necessary, account for the command ID of this command.
2668-
if (((m_lastCommandID + 1) != (UnsignedShort)(cmdMsg->getID())) || (needNewCommandID == TRUE)) {
2669-
len += sizeof(UnsignedByte); // NetPacketFieldTypes::CommandId
2670-
len += sizeof(UnsignedShort); // command ID value
26712655
}
26722656

26732657
++len; // for NetPacketFieldTypes::Data

0 commit comments

Comments
 (0)