Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Core/GameEngine/Include/GameNetwork/NetworkDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ enum ConnectionNumbers CPP_11(: Int)
MAX_PLAYER = 7, // The index of the highest possible player number. This is 0 based, so the most players allowed in a game is MAX_PLAYER+1.
};

#pragma pack(push, 1)
struct TransportMessageHeader
{
UnsignedInt crc; ///< packet-level CRC (must be first in packet)
UnsignedShort magic; ///< Magic number identifying Generals packets
// Int id;
// NetMessageFlags flags;
};
#pragma pack(pop)

static constexpr const Int MAX_SLOTS = MAX_PLAYER+1;

// TheSuperHackers @info As we are not detecting for network fragmentation and dynamically adjusting payload sizes, we set an 1100 bytes UDP payload as a safe upper limit for various networks
Expand Down Expand Up @@ -87,16 +97,6 @@ struct CommandPacket

#define MAX_TRANSPORT_STATISTICS_SECONDS 30

#pragma pack(push, 1)
struct TransportMessageHeader
{
UnsignedInt crc; ///< packet-level CRC (must be first in packet)
UnsignedShort magic; ///< Magic number identifying Generals packets
// Int id;
// NetMessageFlags flags;
};
#pragma pack(pop)

/**
* Transport message - encapsulating info kept by the transport layer about each
* packet. These structs make up the in/out buffers at the transport layer.
Expand Down
Loading