R-Type
Networked shoot'em up built on Aegis2D
Loading...
Searching...
No Matches
rtype::PlayerRecord Struct Reference

What a snapshot says of a player. More...

#include </__w/project-rtype/project-rtype/protocol/include/rtype/snapshot.hpp>

Public Member Functions

bool operator== (const PlayerRecord &) const =default
 Field-by-field equality.
 

Public Attributes

std::uint8_t player = 0
 Player number, 0 to 3.
 
std::uint32_t ship = no_entity
 Network id of its ship, or no_entity once out of lives.
 
std::uint8_t lives = 0
 Lives left.
 
std::uint32_t score = 0
 Score.
 
std::optional< std::uint16_t > input
 Sequence of the last Input of the player the server applied (InputRecord), or nothing before the first.
 

Detailed Description

What a snapshot says of a player.

Member Function Documentation

◆ operator==()

bool rtype::PlayerRecord::operator== ( const PlayerRecord &  ) const
default

Field-by-field equality.

Returns
true if every field is equal.

Member Data Documentation

◆ input

std::optional<std::uint16_t> rtype::PlayerRecord::input

Sequence of the last Input of the player the server applied (InputRecord), or nothing before the first.

◆ lives

std::uint8_t rtype::PlayerRecord::lives = 0

Lives left.

◆ player

std::uint8_t rtype::PlayerRecord::player = 0

Player number, 0 to 3.

◆ score

std::uint32_t rtype::PlayerRecord::score = 0

Score.

◆ ship

std::uint32_t rtype::PlayerRecord::ship = no_entity

Network id of its ship, or no_entity once out of lives.


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