Jazz2::Multiplayer::MpPlayerState struct

Network-agnostic per-player game-mode state for a single round.

Holds the round statistics and team assignment that the game modes read and write, independent of any networking concept. In online sessions PeerDescriptor inherits this; in local splitscreen it is owned directly by the local handler. Keeping per-round state here lets the game modes read and write it through IGameModeContext without knowing about peers or networking.

Derived classes

struct PeerDescriptor
Peer descriptor.

Constructors, destructors, conversion operators

MpPlayerState()

Public variables

std::uint8_t Team
Team ID.
std::uint8_t PreferredTeam
Preferred team requested by the player (0xFF = no preference, let the host decide).
bool TeamLocked
Whether the team was forced (admin/rebalance); client requests are rejected while set.
float TeamSwitchCooldown
Remaining frames before the player may switch teams again.
std::uint32_t PointsInRound
Game-mode specific points held in the current round.
std::uint32_t PositionInRound
Position in the current round.
std::uint32_t Deaths
Deaths in the current round.
std::uint32_t Kills
Kills in the current round.
std::uint32_t Laps
Completed laps in the current round.
std::uint32_t TreasureCollected
Treasure collected in the current round.
TimeStamp LapStarted
Timestamp when the last lap started.
float DeathElapsedFrames
Elapsed frames when the player lost all lives (FLT_MAX while alive).
float LapsElapsedFrames
Elapsed frames of all completed laps.