Packet 2 wire layout
The first byte is the application packet ID. The rows after it appear in decode order. Sizes exclude ENet headers, the outer wrapper prefix, LZF chunk framing, and compression effects.
| # | Field | Encoding | Bytes | Purpose |
|---|---|---|---|---|
| 0 | packet_id | u8 | 1 | Always 2 (0x02). |
| 1 | loop_count | i32 LE | 4 | Global snapshot clock. |
| 2 | player_count | u16 LE | 2 | Number of 56-byte player rows. |
| 3 | players[].player_id | u8 | 1 | Player represented by this repeated row. |
| 4 | players[].position | 3 × IEEE-754 f32 LE | 12 | X, Y, and Z floating-point components. |
| 5 | players[].orientation | 3 × IEEE-754 f32 LE | 12 | X, Y, and Z floating-point components. |
| 6 | players[].velocity | 3 × IEEE-754 f32 LE | 12 | X, Y, and Z floating-point components. |
| 7 | players[].ping | i16 LE | 2 | Latency/sample value retained by the retail row. |
| 8 | players[].pong | i32 LE | 4 | Last ClientData loop consumed for a human; a monotonic server loop for peerless bots. |
| 9 | players[].hp | i16 LE | 2 | Current authoritative health. |
| 10 | players[].input_flags | u8 | 1 | Remote movement input bit field. |
| 11 | players[].action_flags | u8 | 1 | Remote primary, secondary, jetpack, zoom, and deployment actions. |
| 12 | players[].state_flags | u8 | 1 | 0x01 parachute, 0x02 disguise, and 0x08 touching goo. |
| 13 | players[].tool | u8 | 1 | Tool selected for the remote character. |
| 14 | players[].pickup | i8 | 1 | Carried pickup ID; -1 (0xFF) is the required no-pickup sentinel. |
| 15 | players[].jetpack_fuel | sign-magnitude fixed16 LE (1/64) | 2 | players[].jetpack fuel value. |
| 16 | players[].spawn_protection_timer | sign-magnitude fixed16 LE (1/64) | 2 | players[].spawn protection timer value. |
| 17 | players[].weapon_deployment_yaw | sign-magnitude fixed16 LE (1/64) | 2 | players[].weapon deployment yaw value. |
| 18 | entity_count | u16 LE | 2 | Number of variable Entity records that follow. |
| 19 | entities[] | Entity record | 33 + 4I + 2F | Entity layout from packet 21 without another packet-ID byte. |
| 20 | turret_count | u16 LE | 2 | Number of compact rocket-turret aim records. |
| 21 | turrets[] | i16 + 2 × fixed16 | 6 | Entity ID, yaw, and pitch. |
Protocol convention
How to read this layout
LEmeans least-significant byte first.fixed16is two-byte sign-magnitude at 1/64 precision.orientation16uses the measured 1/8192 orientation mapping.- NUL strings consume their encoded byte length plus one
00terminator. - Counted arrays repeat immediately in the order shown.