TeamLastRabbitStandingMode class
Team Last Rabbit Standing game mode (team-based).
Every team has ServerConfiguration::
Base classes
- class CustomGameModeBase
- Common base of the game modes that score points of their own.
Constructors, destructors, conversion operators
Public functions
- auto GetMode() const -> MpGameMode override
- Returns the game mode identifier.
- auto IsTeamBased() const -> bool override
- Returns whether players are split into teams.
- void OnRoundStarted(IGameModeContext& ctx) override
- Called when the round starts (after the countdown) to reset/initialize mode state.
- void OnUpdate(IGameModeContext& ctx, float timeMult) override
- Called every host tick while the round is running.
-
void OnPlayerKilled(IGameModeContext& ctx,
Actors::
Player* victim, Actors:: Player* killer) override - Called when a player dies, for mode-specific reactions (e.g. dropping a carried flag); kill/death counts are maintained by the host.
killermay benullptr(environmental death). -
auto DecideRespawn(IGameModeContext& ctx,
Actors::
Player* player) -> RespawnDecision override - Decides whether and where the specified player should respawn.
- auto CheckGameEnds(IGameModeContext& ctx) -> GameEndResult override
- Checks whether the round should end now, and who won.
-
auto TryGetTeamScore(IGameModeContext& ctx,
std::
uint8_t team, std:: uint32_t& score) -> bool override - Returns the score of the specified team if the mode keeps it on its own, otherwise
false. -
auto TryGetTeamExtra(IGameModeContext& ctx,
std::
uint8_t team, std:: uint32_t& value) -> bool override - Returns a second number of the specified team the HUD shows (synchronized), otherwise
false. -
auto GetStateScore(const MpPlayerState& state) const -> std::
uint32_t override - Returns the ranking metric stored in the specified state, a player with more ranks higher.
- auto GetScoreboardLabel() const -> StringView override
- Returns label of the mode-specific column of the scoreboard, which shows GetStateScore(), or empty.
-
void OnDrawHUD(IGameModeContext& ctx,
IGameModeHUD& hud,
Actors::
Player* player, const Rectf& view) override - Draws the mode-specific part of the HUD for the given player's split-screen view.
- auto HasDamageAmplifierInOvertime() const -> bool override
- Returns
trueif the damage amplifier turns on in the overtime of this mode.
Protected functions
- auto GetOvertimeRule() const -> OvertimeRule override
- Returns how the overtime works in the mode.