R-Type 0.1
Loading...
Searching...
No Matches
rtype::protocol::SnapshotEntityState Struct Reference

State of one entity inside a Snapshot message, 11 bytes. More...

#include <Protocol/SnapshotPayload.hpp>

Public Attributes

be32 networkId
 Identifier of the entity.
 
std::uint8_t entityType = 0
 Low 8 bits of the archetype id.
 
be16 positionX
 Horizontal position, fixed point encoded.
 
be16 positionY
 Vertical position, fixed point encoded.
 
be16 rotation
 Rotation, fraction of a full turn.
 

Detailed Description

State of one entity inside a Snapshot message, 11 bytes.

Offset Size Field Description
0 4 networkId Entity id, never 0, unique per snapshot.
4 1 entityType Low 8 bits of the archetype id.
5 2 positionX Encoded with encodePosition().
7 2 positionY Encoded with encodePosition().
9 2 rotation Encoded with encodeRotation().