Skip to content

Commit b3a6102

Browse files
committed
revert: restore Generals/NetPacket.cpp to clean state
1 parent cd16778 commit b3a6102

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Generals/Code/GameEngine/Source/GameNetwork/NetPacket.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,7 @@ UnsignedInt NetPacket::GetGameCommandSize(NetCommandMsg *msg) {
369369
// Int numTypes = parser->getNumTypes();
370370
GameMessageParserArgumentType *arg = parser->getFirstArgumentType();
371371
while (arg != NULL) {
372-
msglen += sizeof(UnsignedByte); // argument type
373-
msglen += sizeof(UnsignedByte); // argument count
372+
msglen += 2 * sizeof(UnsignedByte); // for the type and number of args of that type declaration.
374373
GameMessageArgumentDataType type = arg->getType();
375374

376375
switch (type) {
@@ -4938,8 +4937,7 @@ Bool NetPacket::isRoomForGameMessage(NetCommandRef *msg, GameMessage *gmsg) {
49384937
// Int numTypes = parser->getNumTypes();
49394938
GameMessageParserArgumentType *arg = parser->getFirstArgumentType();
49404939
while (arg != NULL) {
4941-
msglen += sizeof(UnsignedByte); // argument type
4942-
msglen += sizeof(UnsignedByte); // argument count
4940+
msglen += 2 * sizeof(UnsignedByte); // for the type and number of args of that type declaration.
49434941
GameMessageArgumentDataType type = arg->getType();
49444942

49454943
switch (type) {

0 commit comments

Comments
 (0)