Emergency 20 Dokumentation  4.2.0
em5::multiplayer::ProtocolHelper Class Reference

EMERGENCY 5 multiplayer protocol helper. More...

#include <ProtocolHelper.h>

Static Public Member Functions

static uint16 getProtocolVersion ()
 
static void writeHeader (qsf::game::BitStream &bitStream, uint32 payloadSize)
 Writes the multiplayer protocol header to the given bit stream The header consist of following parts: More...
 
static bool readAndCheckHeader (const qsf::game::BitStream &bitStream, uint16 &protocolVersion, uint32 &payloadSize)
 Reads the multiplayer protocol header from the given stream and does some validation checks The header consist of following parts: More...
 
static bool checkPayloadDataSize (const qsf::game::BitStream &bitStream, uint32 payloadSize)
 Checks if the bit stream contains enough data for the payload. More...
 
static bool writePayloadData (qsf::game::BitStream &bitStream, const qsf::game::BitStream &payloadData)
 Writes the payload data to the bit stream. More...
 
static bool readPayloadData (const qsf::game::BitStream &bitStream, qsf::game::BitStream &payloadData, uint32 payloadSize)
 Reads the payload data from the bit stream. More...
 
static bool writeOperationMessage (qsf::game::BitStream &bitStream, const OperationMessage &operationMessage, const qsf::game::BitStream &operationMessageData)
 Write an operation data to the bit stream. More...
 
static bool readOperationMessageType (const qsf::game::BitStream &bitStream, OperationMessage &operationMessage)
 Reads an operation data from the bit stream. More...
 
static bool readOperationMessage (const qsf::game::BitStream &bitStream, OperationMessage &operationMessage, qsf::game::BitStream &operationMessageData)
 Reads an operation data from the bit stream. More...
 
static bool writeClientJoinRequestOperationMessageData (qsf::game::BitStream &bitStream, const JoinRequestData &joinRequestData)
 Writes the data of the CLIENT_JOIN_REQUEST operation message to the bit stream. More...
 
static bool readClientJoinRequestOperationMessageData (const qsf::game::BitStream &bitStream, JoinRequestData &joinRequestData)
 Reads the data of the CLIENT_JOIN_REQUEST operation message from the bit stream. More...
 
static bool writeServerJoinResponseOperationMessageData (qsf::game::BitStream &bitStream, const JoinResponseData &joinResponseData)
 Writes the data of the SERVER_JOIN_RESPONSE operation message to the bit stream. More...
 
static bool writeServerJoinResponseWithoutAdditionalDataOperationMessageData (qsf::game::BitStream &bitStream, const JoinResponse &joinResponse)
 Writes the data of the SERVER_JOIN_RESPONSE operation message to the bit stream. This is a convenience method for join response which deny the join. More...
 
static bool readServerJoinResponseOperationMessageData (const qsf::game::BitStream &bitStream, JoinResponseData &joinResponseData)
 Reads the data of the SERVER_JOIN_RESPONSE operation message from the bit stream. More...
 
static bool writeReadyForGameOperationMessageData (qsf::game::BitStream &bitStream, const bool readyState)
 Writes the data of the CLIENT_CHANGE_READY operation message to the bit stream. More...
 
static bool readReadyForGameOperationMessageData (const qsf::game::BitStream &bitStream, bool &readyState)
 Reads the data of the CLIENT_CHANGE_READY operation message from the bit stream. More...
 
static bool writeUserDataChangedOperationMessageData (qsf::game::BitStream &bitStream, const uint32 userData)
 Writes the data of the CLIENT_PLAYER_CHANGED_USERDATA operation message to the bit stream. More...
 
static bool readUserDataChangedOperationMessageData (const qsf::game::BitStream &bitStream, uint32 &userData)
 Reads the data of the CLIENT_PLAYER_CHANGED_USERDATA operation message from the bit stream. More...
 
static bool writeServerLoadMapOperationMessageData (qsf::game::BitStream &bitStream)
 Writes the data of the SERVER_LOAD_MAP operation message to the bit stream. More...
 
static bool writeClientMapLoadedOperationMessageData (qsf::game::BitStream &bitStream)
 Writes the data of the CLIENT_MAP_LOADED operation message to the bit stream. More...
 
static bool writeServerGameStartOperationMessageData (qsf::game::BitStream &bitStream)
 Writes the data of the SERVER_GAME_START operation message to the bit stream. More...
 
static bool writeServerPlayerJoinedOperationMessageData (qsf::game::BitStream &bitStream, const std::vector< SessionBase::PlayerInfo > &playerList)
 Writes the data of the SERVER_PLAYER_JOINED operation message to the bit stream. More...
 
static bool readServerPlayerJoinedOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< SessionBase::PlayerInfo > &playerList)
 Reads the data of the SERVER_PLAYER_JOINED operation message from the bit stream. More...
 
static bool writeServerPlayerLeftOperationMessageData (qsf::game::BitStream &bitStream, uint32 playerIndex)
 Writes the data of the SERVER_PLAYER_LEFT operation message to the bit stream. More...
 
static bool readServerPlayerLeftOperationMessageData (const qsf::game::BitStream &bitStream, uint32 &playerIndex)
 Reads the data of the SERVER_PLAYER_LEFT operation message from the bit stream. More...
 
static bool writeServerPlayerChangedReadyStateOperationMessageData (qsf::game::BitStream &bitStream, uint32 playerIndex, bool isReady)
 Writes the data of the SERVER_PLAYER_CHANGED_READY operation message to the bit stream. More...
 
static bool readServerPlayerChangedReadyStateOperationMessageData (const qsf::game::BitStream &bitStream, uint32 &playerIndex, bool &isReady)
 Reads the data of the SERVER_PLAYER_CHANGED_READY operation message from the bit stream. More...
 
static bool writeServerPlayerChangedUserDataOperationMessageData (qsf::game::BitStream &bitStream, uint32 playerIndex, uint32 userData)
 Writes the data of the SERVER_PLAYER_CHANGED_USERDATA operation message to the bit stream. More...
 
static bool readServerPlayerChangedUserDataOperationMessageData (const qsf::game::BitStream &bitStream, uint32 &playerIndex, uint32 &userData)
 Reads the data of the SERVER_PLAYER_CHANGED_USERDATA operation message from the bit stream. More...
 
static bool writeCreateEntityFromPrefabOperationMessageData (qsf::game::BitStream &bitStream, const std::vector< EntityCreatedFromPrefabData > &createdEntitiesList, int32 currentTickCount)
 Writes the data of the CREATE_ENTITY_FROM_PREFAB operation message to the bit stream. More...
 
static bool readCreateEntityFromPrefabOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< EntityCreatedFromPrefabData > &createdEntitiesList, int32 &currentTickCount)
 Reads the data of the CREATE_ENTITY_FROM_PREFAB operation message from the bit stream. More...
 
static bool writeDestroyEntityOperationMessageData (qsf::game::BitStream &bitStream, const std::vector< uint64 > &destroyedEntityIdsList, int32 currentTickCount)
 Writes the data of the DESTROY_ENTITY operation message to the bit stream. More...
 
static bool readDestroyEntityOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< uint64 > &destroyedEntityIdsList, int32 &currentTickCount)
 Reads the data of the DESTROY_ENTITY operation message from the bit stream. More...
 
static bool writeUnitSpawnedOperationMessageData (qsf::game::BitStream &bitStream, const std::vector< UnitSpawnedData > &spawnedUnitDataList, int32 currentTickCount)
 Writes the data of the UNIT_SPAWNED operation message to the bit stream. More...
 
static bool readUnitSpawnedOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< UnitSpawnedData > &spawnedUnitDataList, int32 &currentTickCount)
 Reads the data of the UNIT_SPAWNED operation message from the bit stream. More...
 
static bool writeUnitSpawnedPlayerUpdateSelectionOperationMessageData (qsf::game::BitStream &bitStream, const std::vector< UnitSpawnedPlayerUpdateSelectionData > &spawnedUnitPlayerUpdateSelectionDataList, int32 currentTickCount)
 Writes the data of the UNIT_SPAWNED operation message to the bit stream. More...
 
static bool readUnitSpawnedPlayerUpdateSelectionOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< UnitSpawnedPlayerUpdateSelectionData > &spawnedUnitPlayerUpdateSelectionDataList, int32 &currentTickCount)
 Reads the data of the UNIT_SPAWNED operation message from the bit stream. More...
 
static bool writeClientOrderedUnitOperationMessageData (qsf::game::BitStream &bitStream, const OrderUnitData &orderedUnitData)
 Writes the data of the CLIENT_ORDERED_UNIT operation message to the bit stream. More...
 
static bool readClientOrderedUnitOperationMessageData (const qsf::game::BitStream &bitStream, OrderUnitData &orderedUnitData)
 Reads the data of the CLIENT_ORDERED_UNIT operation message from the bit stream. More...
 
static bool writeClientCommandExecutionOperationMessageData (qsf::game::BitStream &bitStream, const CommandExecutionData &commandData)
 Writes the data of the CLIENT_COMMAND_EXECUTION operation message to the bit stream. More...
 
static bool readClientCommandExecutionOperationMessageData (const qsf::game::BitStream &bitStream, CommandExecutionData &commandData)
 Reads the data of the CLIENT_COMMAND_EXECUTION operation message from the bit stream. More...
 
static bool writeServerCommandExecutionResponseOperationMessageData (qsf::game::BitStream &bitStream, const CommandExecutionResult &commandData)
 Writes the data of the SERVER_COMMAND_EXECUTION_RESPONSE operation message to the bit stream. More...
 
static bool readServerCommandExecutionResponseOperationMessageData (const qsf::game::BitStream &bitStream, CommandExecutionResult &commandData)
 Reads the data of the SERVER_COMMAND_EXECUTION_RESPONSE operation message from the bit stream. More...
 
static bool writeFreeplayEventUpdateOperationMessageData (qsf::game::BitStream &bitStream, const std::unordered_map< uint32, FreeplayEventData > &updatedFreeplayEventList, int32 currentTickCount)
 Writes the data of the FREEPLAY_EVENT_UPDATE operation message to the bit stream. More...
 
static bool readFreeplayEventUpdateOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< FreeplayEventData > &updatedFreeplayEventList, int32 &currentTickCount)
 Reads the data of the FREEPLAY_EVENT_UPDATE operation message from the bit stream. More...
 
static bool writeChatMessageOperationMessageData (qsf::game::BitStream &bitStream, const SessionBase::ChatMessage &chatMessage)
 Writes the data of the CHAT_MESSAGE operation message to the bit stream. More...
 
static bool readChatMessageOperationMessageData (const qsf::game::BitStream &bitStream, SessionBase::ChatMessage &chatMessage)
 Reads the data of the CHAT_MESSAGE operation message from the bit stream. More...
 
static bool writePlayerScoreChangedOperationMessageData (qsf::game::BitStream &bitStream, const boost::container::flat_map< uint32, uint32 > &playerScoreList, int32 currentTickCount)
 Writes the data of the PLAYER_SCORE_UPDATE operation message to the bit stream. More...
 
static bool readPlayerScoreChangedOperationMessageData (const qsf::game::BitStream &bitStream, boost::container::flat_map< uint32, uint32 > &playerScoreList, int32 &currentTickCount)
 Reads the data of the PLAYER_SCORE_UPDATE operation message from the bit stream. More...
 
static bool writeGameModeUpdateOperationMessageData (qsf::game::BitStream &bitStream, const GameModeUpdateData &gameModeUpdateData, int32 currentTickCount)
 Writes the data of the GAME_MODE_UPDATE operation message to the bit stream. More...
 
static bool readGameModeUpdateOperationMessageData (const qsf::game::BitStream &bitStream, GameModeUpdateData &gameModeUpdateData, int32 &currentTickCount)
 Reads the data of the GAME_MODE_UPDATE operation message from the bit stream. More...
 
static bool writeNewHintsOperationMessageData (qsf::game::BitStream &bitStream, const std::vector< NewHintData > &newHintList, int32 currentTickCount)
 Writes the data of the NEW_HINTS operation message to the bit stream. More...
 
static bool readNewHintsOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< NewHintData > &newHintList, int32 &currentTickCount)
 Reads the data of the NEW_HINTS operation message from the bit stream. More...
 
static bool writeMinimapMessagesOperationMessageData (qsf::game::BitStream &bitStream, const std::vector< MinimapMessageData > &minimapMessageList, int32 currentTickCount)
 Writes the data of the MINIMAP_MESSAGES operation message to the bit stream. More...
 
static bool readMinimapMessagesOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< MinimapMessageData > &minimapMessageList, int32 &currentTickCount)
 Reads the data of the MINIMAP_MESSAGES operation message from the bit stream. More...
 
static bool writeMinimapIconMessagesOperationMessageData (qsf::game::BitStream &bitStream, const std::vector< MinimapIconMessageData > &minimapMessageList, int32 currentTickCount)
 Writes the data of the MINIMAP_ICON_MESSAGES operation message to the bit stream. More...
 
static bool readMinimapIconMessagesOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< MinimapIconMessageData > &minimapMessageList, int32 &currentTickCount)
 Reads the data of the MINIMAP_ICON_MESSAGES operation message from the bit stream. More...
 
static bool writeAudioUpdatedMessagesOperationMessageData (qsf::game::BitStream &bitStream, const std::vector< AudioUpdateData > &changedAudioList, int32 currentTickCount)
 Writes the data of the AUDIO_UPDATE operation message to the bit stream. More...
 
static bool readAudioUpdatedOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< AudioUpdateData > &changedAudioList, int32 &currentTickCount)
 Reads the data of the AUDIO_UPDATE operation message from the bit stream. More...
 
static bool writeLayerChangedOperationMessageData (qsf::game::BitStream &bitStream, const std::vector< LayerChangedData > &changedLayerList, int32 currentTickCount)
 Writes the data of the LAYER_CHANGED operation message to the bit stream. More...
 
static bool readLayerChangedOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< LayerChangedData > &changedLayerList, int32 &currentTickCount)
 Reads the data of the LAYER_CHANGED operation message from the bit stream. More...
 
static bool writeNewFireHoseOperationMessageData (qsf::game::BitStream &bitStream, const std::vector< CreateFireHoseData > &newFirehosesList, int32 currentTickCount)
 Writes the data of the FIREHOSE_UPDATE operation message to the bit stream. More...
 
static bool readNewFireHoseOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< CreateFireHoseData > &newFirehosesList, int32 &currentTickCount)
 Reads the data of the FIREHOSE_UPDATE operation message from the bit stream. More...
 
static bool writeSpawnParticleOperationMessageData (qsf::game::BitStream &bitStream, const std::vector< SpawnParticleData > &spawnParticleList, int32 currentTickCount)
 Writes the data of the SPAWN_PARTICLE operation message to the bit stream. More...
 
static bool readSpawnParticleOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< SpawnParticleData > &spawnParticleList, int32 &currentTickCount)
 Reads the data of the SPAWN_PARTICLE operation message from the bit stream. More...
 
static bool writeClientCameraPositionOperationMessageData (qsf::game::BitStream &bitStream, const glm::vec3 &position)
 Writes the data of the CLIENT_CAMERA_POSITION operation message to the bit stream. More...
 
static bool readClientCameraPositionOperationMessageData (const qsf::game::BitStream &bitStream, glm::vec3 &position)
 Reads the data of the CLIENT_CAMERA_POSITION operation message from the bit stream. More...
 
static bool writeServerPingOperationMessageData (qsf::game::BitStream &bitStream, const ServerPingData &pingData)
 Writes the data of the SERVER_PING operation message to the bit stream. More...
 
static bool readServerPingOperationMessageData (const qsf::game::BitStream &bitStream, ServerPingData &pingData)
 Reads the data of the SERVER_PING operation message from the bit stream. More...
 
static bool writeClientPingAcknowledgeOperationMessageData (qsf::game::BitStream &bitStream, const ClientPingAcknowledgeData &pingAcknowledgeData)
 Writes the data of the CLIENT_PING_ACKNOWLEDGE operation message to the bit stream. More...
 
static bool readClientPingAcknowledgeOperationMessageData (const qsf::game::BitStream &bitStream, ClientPingAcknowledgeData &pingAcknowledgeData)
 Reads the data of the CLIENT_PING_ACKNOWLEDGE operation message from the bit stream. More...
 
static bool writeFadeEntityOperationMessageData (qsf::game::BitStream &bitStream, const std::vector< FadeEntityData > &fadeEntityDataList, int32 currentTickCount)
 Writes the data of the FADE_ENTITY operation message to the bit stream. More...
 
static bool readFadeEntityOperationMessageData (const qsf::game::BitStream &bitStream, std::vector< FadeEntityData > &fadeEntityDataList, int32 &currentTickCount)
 Reads the data of the FADE_ENTITY operation message from the bit stream. More...
 
static bool writeMinimapPingOperationMessageData (qsf::game::BitStream &bitStream, const MinimapPingData &minimapPingData, int32 currentTickCount)
 Writes the data of the MINIMAP_PING operation message to the bit stream. More...
 
static bool readMinimapPingOperationMessageData (const qsf::game::BitStream &bitStream, MinimapPingData &minimapPingData, int32 &currentTickCount)
 Reads the data of the MINIMAP_PING operation message from the bit stream. More...
 
static bool writeOperationMessageAsSingleMessage (qsf::game::BitStream &bitStream, const OperationMessage &operationMessage, const qsf::game::BitStream &operationMessagePayload)
 Write a single operation message data to the bit stream (This writes also the header for a multiplayer "message") More...
 
static bool writeOperationMessageWithoutAdditionalPayloadAsSingleMessage (qsf::game::BitStream &bitStream, const OperationMessage &operationMessage)
 Write a single operation message data to the bit stream (This writes also the header for a multiplayer "message") More...
 

Detailed Description

EMERGENCY 5 multiplayer protocol helper.

Member Function Documentation

static bool em5::multiplayer::ProtocolHelper::checkPayloadDataSize ( const qsf::game::BitStream bitStream,
uint32  payloadSize 
)
static

Checks if the bit stream contains enough data for the payload.

Parameters
[in]bitStreamThe source bit stream to check
[in]payloadSizeThe payload size which should the bit stream contain
Returns
"true" when the check went fine, otherwise "false"
static uint16 em5::multiplayer::ProtocolHelper::getProtocolVersion ( )
static
static bool em5::multiplayer::ProtocolHelper::readAndCheckHeader ( const qsf::game::BitStream bitStream,
uint16 protocolVersion,
uint32 payloadSize 
)
static

Reads the multiplayer protocol header from the given stream and does some validation checks The header consist of following parts:

  • An Identifier string of 5 chars (EM5MP)
  • A protocol version, uint16 (The current version knows the helper)
  • The size of the payload (in amount of bits), uint32
Parameters
[in]bitStreamThe bit stream from which the data is read from
[out]protocolVersionThe protocol version
[out]payloadSizeThe payload size
Returns
"true" when all checks went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readAudioUpdatedOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< AudioUpdateData > &  changedAudioList,
int32 currentTickCount 
)
static

Reads the data of the AUDIO_UPDATE operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]changedAudioListThe list of audio related messages
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readChatMessageOperationMessageData ( const qsf::game::BitStream bitStream,
SessionBase::ChatMessage chatMessage 
)
static

Reads the data of the CHAT_MESSAGE operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]chatMessageThe chat message data
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readClientCameraPositionOperationMessageData ( const qsf::game::BitStream bitStream,
glm::vec3 &  position 
)
static

Reads the data of the CLIENT_CAMERA_POSITION operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[in]positionThe position of the players camera
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readClientCommandExecutionOperationMessageData ( const qsf::game::BitStream bitStream,
CommandExecutionData commandData 
)
static

Reads the data of the CLIENT_COMMAND_EXECUTION operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]commandDataThe command data
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readClientJoinRequestOperationMessageData ( const qsf::game::BitStream bitStream,
JoinRequestData joinRequestData 
)
static

Reads the data of the CLIENT_JOIN_REQUEST operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]joinRequestDataThe join request data
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readClientOrderedUnitOperationMessageData ( const qsf::game::BitStream bitStream,
OrderUnitData orderedUnitData 
)
static

Reads the data of the CLIENT_ORDERED_UNIT operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]orderedUnitDataThe ordered unit data
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readClientPingAcknowledgeOperationMessageData ( const qsf::game::BitStream bitStream,
ClientPingAcknowledgeData pingAcknowledgeData 
)
static

Reads the data of the CLIENT_PING_ACKNOWLEDGE operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[in]pingAcknowledgeDataThe client ping acknowledge data
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readCreateEntityFromPrefabOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< EntityCreatedFromPrefabData > &  createdEntitiesList,
int32 currentTickCount 
)
static

Reads the data of the CREATE_ENTITY_FROM_PREFAB operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]createdEntitiesListThe list of create entity from prefab data items
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readDestroyEntityOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< uint64 > &  destroyedEntityIdsList,
int32 currentTickCount 
)
static

Reads the data of the DESTROY_ENTITY operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[in]destroyedEntityIdsListThe list of destroyed entity Ids
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readFadeEntityOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< FadeEntityData > &  fadeEntityDataList,
int32 currentTickCount 
)
static

Reads the data of the FADE_ENTITY operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[in]fadeEntityDataListA list of fade entity data
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readFreeplayEventUpdateOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< FreeplayEventData > &  updatedFreeplayEventList,
int32 currentTickCount 
)
static

Reads the data of the FREEPLAY_EVENT_UPDATE operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[in]updatedFreeplayEventListThe list of data about changed freeplay events
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readGameModeUpdateOperationMessageData ( const qsf::game::BitStream bitStream,
GameModeUpdateData gameModeUpdateData,
int32 currentTickCount 
)
static

Reads the data of the GAME_MODE_UPDATE operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]gameModeUpdateDataThe game mode update data
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readLayerChangedOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< LayerChangedData > &  changedLayerList,
int32 currentTickCount 
)
static

Reads the data of the LAYER_CHANGED operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]changedAudioListThe list of audio related messages
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readMinimapIconMessagesOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< MinimapIconMessageData > &  minimapMessageList,
int32 currentTickCount 
)
static

Reads the data of the MINIMAP_ICON_MESSAGES operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]minimapMessageListThe list of minimap icon messages
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readMinimapMessagesOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< MinimapMessageData > &  minimapMessageList,
int32 currentTickCount 
)
static

Reads the data of the MINIMAP_MESSAGES operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]minimapMessageListThe list of minimap related messages
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readMinimapPingOperationMessageData ( const qsf::game::BitStream bitStream,
MinimapPingData minimapPingData,
int32 currentTickCount 
)
static

Reads the data of the MINIMAP_PING operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[in]minimapPingDataMinimap ping data
Returns
"true" when reading went fine, otherwise "false"
Note
This method writes only the payload data (without the operation message id)
static bool em5::multiplayer::ProtocolHelper::readNewFireHoseOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< CreateFireHoseData > &  newFirehosesList,
int32 currentTickCount 
)
static

Reads the data of the FIREHOSE_UPDATE operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[in]newFirehosesListThe list of new fire hoses
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readNewHintsOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< NewHintData > &  newHintList,
int32 currentTickCount 
)
static

Reads the data of the NEW_HINTS operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]newHintListThe list of new hints
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readOperationMessage ( const qsf::game::BitStream bitStream,
OperationMessage operationMessage,
qsf::game::BitStream operationMessageData 
)
static

Reads an operation data from the bit stream.

Parameters
[in]bitStreamThe source bit stream from which the data is read from
[out]operationMessageThe operation message type which was read from the stream
[out]operationMessageDataThe payload data of the operation message (can be empty)
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readOperationMessageType ( const qsf::game::BitStream bitStream,
OperationMessage operationMessage 
)
static

Reads an operation data from the bit stream.

Parameters
[in]bitStreamThe source bit stream from which the data is read from
[out]operationMessageThe operation message type which was read from the stream
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readPayloadData ( const qsf::game::BitStream bitStream,
qsf::game::BitStream payloadData,
uint32  payloadSize 
)
static

Reads the payload data from the bit stream.

Parameters
[in]bitStreamThe source bit stream from which the data is read from
[out]payloadDataThe bit stream to which the read payload data is written to
[in]payloadSizeThe payload size which should be read from the source bit stream
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readPlayerScoreChangedOperationMessageData ( const qsf::game::BitStream bitStream,
boost::container::flat_map< uint32, uint32 > &  playerScoreList,
int32 currentTickCount 
)
static

Reads the data of the PLAYER_SCORE_UPDATE operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]playerScoreListThe list of changed player scores (key = player index, value = score)
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readReadyForGameOperationMessageData ( const qsf::game::BitStream bitStream,
bool &  readyState 
)
static

Reads the data of the CLIENT_CHANGE_READY operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[out]readyStateThe data for the CLIENT_CHANGE_READY operation message
static bool em5::multiplayer::ProtocolHelper::readServerCommandExecutionResponseOperationMessageData ( const qsf::game::BitStream bitStream,
CommandExecutionResult commandData 
)
static

Reads the data of the SERVER_COMMAND_EXECUTION_RESPONSE operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]commandDataThe command result data
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readServerJoinResponseOperationMessageData ( const qsf::game::BitStream bitStream,
JoinResponseData joinResponseData 
)
static

Reads the data of the SERVER_JOIN_RESPONSE operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]joinResponseDataThe join response data
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readServerPingOperationMessageData ( const qsf::game::BitStream bitStream,
ServerPingData pingData 
)
static

Reads the data of the SERVER_PING operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[in]pingDataThe server ping data
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readServerPlayerChangedReadyStateOperationMessageData ( const qsf::game::BitStream bitStream,
uint32 playerIndex,
bool &  isReady 
)
static

Reads the data of the SERVER_PLAYER_CHANGED_READY operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]playerIndexThe player index of the player which changed his ready state
[out]isReadyThe ready state
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readServerPlayerChangedUserDataOperationMessageData ( const qsf::game::BitStream bitStream,
uint32 playerIndex,
uint32 userData 
)
static

Reads the data of the SERVER_PLAYER_CHANGED_USERDATA operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]playerIndexThe player index of the player which changed his ready state
[out]userDataThe userData value
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readServerPlayerJoinedOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< SessionBase::PlayerInfo > &  playerList 
)
static

Reads the data of the SERVER_PLAYER_JOINED operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]playerListWill contain the list of player information which were part of the message
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readServerPlayerLeftOperationMessageData ( const qsf::game::BitStream bitStream,
uint32 playerIndex 
)
static

Reads the data of the SERVER_PLAYER_LEFT operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[out]playerIndexThe index of the player which has left the game
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readSpawnParticleOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< SpawnParticleData > &  spawnParticleList,
int32 currentTickCount 
)
static

Reads the data of the SPAWN_PARTICLE operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[in]spawnParticleListThe list of newly spawned particles
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readUnitSpawnedOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< UnitSpawnedData > &  spawnedUnitDataList,
int32 currentTickCount 
)
static

Reads the data of the UNIT_SPAWNED operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[in]spawnedUnitDataListThe list of data about spawned units (Currently only the data from the commandable component)
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readUnitSpawnedPlayerUpdateSelectionOperationMessageData ( const qsf::game::BitStream bitStream,
std::vector< UnitSpawnedPlayerUpdateSelectionData > &  spawnedUnitPlayerUpdateSelectionDataList,
int32 currentTickCount 
)
static

Reads the data of the UNIT_SPAWNED operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream from which the data is read from
[in]spawnedUnitDataListThe list of data about spawned units (Currently only the data from the commandable component)
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::readUserDataChangedOperationMessageData ( const qsf::game::BitStream bitStream,
uint32 userData 
)
static

Reads the data of the CLIENT_PLAYER_CHANGED_USERDATA operation message from the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[out]userDataThe data for the CLIENT_PLAYER_CHANGED_USERDATA operation message
static bool em5::multiplayer::ProtocolHelper::writeAudioUpdatedMessagesOperationMessageData ( qsf::game::BitStream bitStream,
const std::vector< AudioUpdateData > &  changedAudioList,
int32  currentTickCount 
)
static

Writes the data of the AUDIO_UPDATE operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]changedAudioListThe list of audio related messages
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeChatMessageOperationMessageData ( qsf::game::BitStream bitStream,
const SessionBase::ChatMessage chatMessage 
)
static

Writes the data of the CHAT_MESSAGE operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]chatMessageThe chat message data
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeClientCameraPositionOperationMessageData ( qsf::game::BitStream bitStream,
const glm::vec3 &  position 
)
static

Writes the data of the CLIENT_CAMERA_POSITION operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]positionThe position of the players camera
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeClientCommandExecutionOperationMessageData ( qsf::game::BitStream bitStream,
const CommandExecutionData commandData 
)
static

Writes the data of the CLIENT_COMMAND_EXECUTION operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]commandDataThe command data
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeClientJoinRequestOperationMessageData ( qsf::game::BitStream bitStream,
const JoinRequestData joinRequestData 
)
static

Writes the data of the CLIENT_JOIN_REQUEST operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]joinRequestDataThe join request data
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeClientMapLoadedOperationMessageData ( qsf::game::BitStream bitStream)
static

Writes the data of the CLIENT_MAP_LOADED operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
static bool em5::multiplayer::ProtocolHelper::writeClientOrderedUnitOperationMessageData ( qsf::game::BitStream bitStream,
const OrderUnitData orderedUnitData 
)
static

Writes the data of the CLIENT_ORDERED_UNIT operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]orderedUnitDataThe ordered unit data
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeClientPingAcknowledgeOperationMessageData ( qsf::game::BitStream bitStream,
const ClientPingAcknowledgeData pingAcknowledgeData 
)
static

Writes the data of the CLIENT_PING_ACKNOWLEDGE operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]pingAcknowledgeDataThe client ping acknowledge data
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeCreateEntityFromPrefabOperationMessageData ( qsf::game::BitStream bitStream,
const std::vector< EntityCreatedFromPrefabData > &  createdEntitiesList,
int32  currentTickCount 
)
static

Writes the data of the CREATE_ENTITY_FROM_PREFAB operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]createdEntitiesListThe list of create entity from prefab data items
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeDestroyEntityOperationMessageData ( qsf::game::BitStream bitStream,
const std::vector< uint64 > &  destroyedEntityIdsList,
int32  currentTickCount 
)
static

Writes the data of the DESTROY_ENTITY operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]destroyedEntityIdsListThe list of destroyed entity Ids
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeFadeEntityOperationMessageData ( qsf::game::BitStream bitStream,
const std::vector< FadeEntityData > &  fadeEntityDataList,
int32  currentTickCount 
)
static

Writes the data of the FADE_ENTITY operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]fadeEntityDataListA list of fade entity data
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeFreeplayEventUpdateOperationMessageData ( qsf::game::BitStream bitStream,
const std::unordered_map< uint32, FreeplayEventData > &  updatedFreeplayEventList,
int32  currentTickCount 
)
static

Writes the data of the FREEPLAY_EVENT_UPDATE operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]updatedFreeplayEventListThe list of data about changed freeplay events
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeGameModeUpdateOperationMessageData ( qsf::game::BitStream bitStream,
const GameModeUpdateData gameModeUpdateData,
int32  currentTickCount 
)
static

Writes the data of the GAME_MODE_UPDATE operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]gameModeUpdateDataThe game mode update data
Returns
"true" when writing went fine, otherwise "false"
static void em5::multiplayer::ProtocolHelper::writeHeader ( qsf::game::BitStream bitStream,
uint32  payloadSize 
)
static

Writes the multiplayer protocol header to the given bit stream The header consist of following parts:

  • An Identifier string of 5 chars (EM5MP)
  • A protocol version, uint16 (The current version knows the helper)
  • The size of the payload (in amount of bits), uint32
Parameters
[in]bitStreamThe bit stream to which the data is written to
[in]payloadSizeThe payload size
static bool em5::multiplayer::ProtocolHelper::writeLayerChangedOperationMessageData ( qsf::game::BitStream bitStream,
const std::vector< LayerChangedData > &  changedLayerList,
int32  currentTickCount 
)
static

Writes the data of the LAYER_CHANGED operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]changedLayerListThe list of changed layers
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeMinimapIconMessagesOperationMessageData ( qsf::game::BitStream bitStream,
const std::vector< MinimapIconMessageData > &  minimapMessageList,
int32  currentTickCount 
)
static

Writes the data of the MINIMAP_ICON_MESSAGES operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]minimapMessageListThe list of minimap icon messages
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeMinimapMessagesOperationMessageData ( qsf::game::BitStream bitStream,
const std::vector< MinimapMessageData > &  minimapMessageList,
int32  currentTickCount 
)
static

Writes the data of the MINIMAP_MESSAGES operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]minimapMessageListThe list of minimap related messages
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeMinimapPingOperationMessageData ( qsf::game::BitStream bitStream,
const MinimapPingData minimapPingData,
int32  currentTickCount 
)
static

Writes the data of the MINIMAP_PING operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]minimapPingDataMinimap ping data
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeNewFireHoseOperationMessageData ( qsf::game::BitStream bitStream,
const std::vector< CreateFireHoseData > &  newFirehosesList,
int32  currentTickCount 
)
static

Writes the data of the FIREHOSE_UPDATE operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]newFirehosesListThe list of new fire hoses
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeNewHintsOperationMessageData ( qsf::game::BitStream bitStream,
const std::vector< NewHintData > &  newHintList,
int32  currentTickCount 
)
static

Writes the data of the NEW_HINTS operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]newHintListThe list of new hints
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeOperationMessage ( qsf::game::BitStream bitStream,
const OperationMessage operationMessage,
const qsf::game::BitStream operationMessageData 
)
static

Write an operation data to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]operationMessageThe operation message type which was read from the stream
[in]operationMessageDataThe payload data of the operation message (can be empty)
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeOperationMessageAsSingleMessage ( qsf::game::BitStream bitStream,
const OperationMessage operationMessage,
const qsf::game::BitStream operationMessagePayload 
)
static

Write a single operation message data to the bit stream (This writes also the header for a multiplayer "message")

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]operationMessageThe operation message type which was read from the stream
[in]operationMessagePayloadThe payload data of the operation message (can be empty)
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeOperationMessageWithoutAdditionalPayloadAsSingleMessage ( qsf::game::BitStream bitStream,
const OperationMessage operationMessage 
)
static

Write a single operation message data to the bit stream (This writes also the header for a multiplayer "message")

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]operationMessageThe operation message type which was read from the stream
Returns
"true" when reading went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writePayloadData ( qsf::game::BitStream bitStream,
const qsf::game::BitStream payloadData 
)
static

Writes the payload data to the bit stream.

Parameters
[in]bitStreamThe bit stream to which the data is written to
[in]payloadDataThe bit stream containing the payload data
Returns
"true" when all went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writePlayerScoreChangedOperationMessageData ( qsf::game::BitStream bitStream,
const boost::container::flat_map< uint32, uint32 > &  playerScoreList,
int32  currentTickCount 
)
static

Writes the data of the PLAYER_SCORE_UPDATE operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]playerScoreListThe list of changed player scores (key = player index, value = score)
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeReadyForGameOperationMessageData ( qsf::game::BitStream bitStream,
const bool  readyState 
)
static

Writes the data of the CLIENT_CHANGE_READY operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]readyStateThe data for the "ready for game" operation message
static bool em5::multiplayer::ProtocolHelper::writeServerCommandExecutionResponseOperationMessageData ( qsf::game::BitStream bitStream,
const CommandExecutionResult commandData 
)
static

Writes the data of the SERVER_COMMAND_EXECUTION_RESPONSE operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]commandDataThe command result data
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeServerGameStartOperationMessageData ( qsf::game::BitStream bitStream)
static

Writes the data of the SERVER_GAME_START operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
static bool em5::multiplayer::ProtocolHelper::writeServerJoinResponseOperationMessageData ( qsf::game::BitStream bitStream,
const JoinResponseData joinResponseData 
)
static

Writes the data of the SERVER_JOIN_RESPONSE operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]joinResponseDataThe join response data
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeServerJoinResponseWithoutAdditionalDataOperationMessageData ( qsf::game::BitStream bitStream,
const JoinResponse joinResponse 
)
static

Writes the data of the SERVER_JOIN_RESPONSE operation message to the bit stream. This is a convenience method for join response which deny the join.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]joinResponseThe join response value
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeServerLoadMapOperationMessageData ( qsf::game::BitStream bitStream)
static

Writes the data of the SERVER_LOAD_MAP operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
static bool em5::multiplayer::ProtocolHelper::writeServerPingOperationMessageData ( qsf::game::BitStream bitStream,
const ServerPingData pingData 
)
static

Writes the data of the SERVER_PING operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]pingDataThe server ping data
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeServerPlayerChangedReadyStateOperationMessageData ( qsf::game::BitStream bitStream,
uint32  playerIndex,
bool  isReady 
)
static

Writes the data of the SERVER_PLAYER_CHANGED_READY operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]playerIndexThe player index of the player which changed his ready state
[in]isReadyThe ready state
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeServerPlayerChangedUserDataOperationMessageData ( qsf::game::BitStream bitStream,
uint32  playerIndex,
uint32  userData 
)
static

Writes the data of the SERVER_PLAYER_CHANGED_USERDATA operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]playerIndexThe player index of the player which changed his ready state
[in]userDataThe userData value
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeServerPlayerJoinedOperationMessageData ( qsf::game::BitStream bitStream,
const std::vector< SessionBase::PlayerInfo > &  playerList 
)
static

Writes the data of the SERVER_PLAYER_JOINED operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]playerListThe List of player information to be send by the operation message as data
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeServerPlayerLeftOperationMessageData ( qsf::game::BitStream bitStream,
uint32  playerIndex 
)
static

Writes the data of the SERVER_PLAYER_LEFT operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]playerIndexThe index of the player which has left the game
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeSpawnParticleOperationMessageData ( qsf::game::BitStream bitStream,
const std::vector< SpawnParticleData > &  spawnParticleList,
int32  currentTickCount 
)
static

Writes the data of the SPAWN_PARTICLE operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]spawnParticleListThe list of newly spawned particles
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeUnitSpawnedOperationMessageData ( qsf::game::BitStream bitStream,
const std::vector< UnitSpawnedData > &  spawnedUnitDataList,
int32  currentTickCount 
)
static

Writes the data of the UNIT_SPAWNED operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]spawnedUnitDataListThe list of data about spawned units (Currently only the data from the commandable component)
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeUnitSpawnedPlayerUpdateSelectionOperationMessageData ( qsf::game::BitStream bitStream,
const std::vector< UnitSpawnedPlayerUpdateSelectionData > &  spawnedUnitPlayerUpdateSelectionDataList,
int32  currentTickCount 
)
static

Writes the data of the UNIT_SPAWNED operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]spawnedUnitDataListThe list of data about spawned units (Currently only the data from the commandable component)
Returns
"true" when writing went fine, otherwise "false"
static bool em5::multiplayer::ProtocolHelper::writeUserDataChangedOperationMessageData ( qsf::game::BitStream bitStream,
const uint32  userData 
)
static

Writes the data of the CLIENT_PLAYER_CHANGED_USERDATA operation message to the bit stream.

Parameters
[in]bitStreamThe target bit stream to which the data is written to
[in]userDataThe data for the "userData changed" operation message

The documentation for this class was generated from the following file: