DominationMode class
Domination game mode (team-based).
The level has up to 16 control points — events marked as easy-only or hard-only and CTF bases, otherwise a few spawn points. Touching a point for a second captures it for the team, unless a player of the team holding it touches it in the meantime, and points never become neutral again. Every point scores a point for its team once per interval, which is 5 seconds for every (started) 4 control points. The first team to reach the score wins.
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.
-
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 GetStateScore(const MpPlayerState& state) const -> std::
uint32_t override - Returns the ranking metric stored in the specified state, a player with more ranks higher.
-
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.