Complete replicated gameplay state published by one player. More...
#include <examples/asteroids-net/multiplayer.hpp>
Public Attributes | |
| std::array< NetworkAsteroid, NETWORK_ASTEROID_COUNT > | asteroids {} |
| Host-authoritative asteroids. | |
| std::array< std::uint32_t, NETWORK_PLAYER_COUNT > | consumed_projectile_ids {} |
| Last consumed projectile per player. | |
| float | current_speed = 1.0f |
| Ship forward speed. | |
| std::array< std::uint32_t, NETWORK_PLAYER_COUNT > | death_serials {} |
| Monotonic death events by player slot. | |
| std::uint8_t | exploding = 0 |
| Nonzero while the ship is exploding. | |
| std::array< std::uint32_t, NETWORK_PLAYER_COUNT > | kills {} |
| Kill counters by player slot. | |
| std::uint8_t | match_started = 0 |
| Nonzero after the host starts the match. | |
| std::array< float, 3 > | position {} |
| Ship world-space position. | |
| std::array< NetworkProjectile, NETWORK_PROJECTILE_COUNT > | projectiles {} |
| Locally owned projectiles. | |
| std::array< float, 3 > | rotation {} |
| Ship Euler rotation in degrees. | |
| std::uint8_t | winner = 0 |
| Winning player identifier, or zero if unset. | |
Complete replicated gameplay state published by one player.
Definition at line 57 of file multiplayer.hpp.
| std::array<NetworkAsteroid, NETWORK_ASTEROID_COUNT> space::NetworkState::asteroids {} |
Host-authoritative asteroids.
Definition at line 62 of file multiplayer.hpp.
| std::array<std::uint32_t, NETWORK_PLAYER_COUNT> space::NetworkState::consumed_projectile_ids {} |
Last consumed projectile per player.
Definition at line 65 of file multiplayer.hpp.
| float space::NetworkState::current_speed = 1.0f |
Ship forward speed.
Definition at line 60 of file multiplayer.hpp.
| std::array<std::uint32_t, NETWORK_PLAYER_COUNT> space::NetworkState::death_serials {} |
Monotonic death events by player slot.
Definition at line 64 of file multiplayer.hpp.
| std::uint8_t space::NetworkState::exploding = 0 |
Nonzero while the ship is exploding.
Definition at line 66 of file multiplayer.hpp.
| std::array<std::uint32_t, NETWORK_PLAYER_COUNT> space::NetworkState::kills {} |
Kill counters by player slot.
Definition at line 63 of file multiplayer.hpp.
| std::uint8_t space::NetworkState::match_started = 0 |
Nonzero after the host starts the match.
Definition at line 67 of file multiplayer.hpp.
| std::array<float, 3> space::NetworkState::position {} |
Ship world-space position.
Definition at line 58 of file multiplayer.hpp.
| std::array<NetworkProjectile, NETWORK_PROJECTILE_COUNT> space::NetworkState::projectiles {} |
Locally owned projectiles.
Definition at line 61 of file multiplayer.hpp.
| std::array<float, 3> space::NetworkState::rotation {} |
Ship Euler rotation in degrees.
Definition at line 59 of file multiplayer.hpp.
| std::uint8_t space::NetworkState::winner = 0 |
Winning player identifier, or zero if unset.
Definition at line 68 of file multiplayer.hpp.