Bomberman Multiplayer
Authoritative multiplayer networking layer for Bomberman.
Loading...
Searching...
No Matches
ServerPowerups.h
Go to the documentation of this file.
1
7#ifndef BOMBERMAN_SERVER_SERVERPOWERUPS_H
8#define BOMBERMAN_SERVER_SERVERPOWERUPS_H
9
10#include <span>
11
12#include "ServerState.h"
13
14namespace bomberman::server
15{
17 [[nodiscard]]
18 bool hasInvincibility(const MatchPlayerState& matchPlayer, uint32_t serverTick);
19
21 [[nodiscard]]
22 bool hasSpeedBoost(const MatchPlayerState& matchPlayer, uint32_t serverTick);
23
25 [[nodiscard]]
26 bool hasBombRangeBoost(const MatchPlayerState& matchPlayer, uint32_t serverTick);
27
29 [[nodiscard]]
30 bool hasMaxBombsBoost(const MatchPlayerState& matchPlayer, uint32_t serverTick);
31
33 void refreshMatchPlayerPowerupLoadout(const ServerState& state, MatchPlayerState& matchPlayer);
34
36 [[nodiscard]]
37 uint8_t buildReplicatedPlayerFlags(const MatchPlayerState& matchPlayer, uint32_t serverTick);
38
40 void clearRoundPowerups(ServerState& state);
41
43 void placeRoundPowerups(ServerState& state);
44
46 void revealPowerupsUnderDestroyedBricks(ServerState& state, std::span<const BombCell> destroyedBricks);
47
49 void collectRevealedPowerups(ServerState& state);
50} // namespace bomberman::server
51
52#endif // BOMBERMAN_SERVER_SERVERPOWERUPS_H
Authoritative server state model, lifecycle helpers, and fixed-tick simulation API.
Authoritative dedicated-server state, match flow, and fixed-tick simulation support.
Definition ServerBombs.cpp:21
uint8_t buildReplicatedPlayerFlags(const MatchPlayerState &matchPlayer, const uint32_t serverTick)
Builds the replicated player-flag bitmask.
Definition ServerPowerups.cpp:84
void revealPowerupsUnderDestroyedBricks(ServerState &state, const std::span< const BombCell > destroyedBricks)
Reveals any hidden powerups whose brick cells were just destroyed.
Definition ServerPowerups.cpp:170
void collectRevealedPowerups(ServerState &state)
Removes any revealed powerups collected by active match players on the current tick.
Definition ServerPowerups.cpp:197
void clearRoundPowerups(ServerState &state)
Clears all hidden and revealed round powerup state.
Definition ServerPowerups.cpp:117
bool hasBombRangeBoost(const MatchPlayerState &matchPlayer, const uint32_t serverTick)
Returns true if bomb-range boost is active.
Definition ServerPowerups.cpp:63
bool hasInvincibility(const MatchPlayerState &matchPlayer, const uint32_t serverTick)
Returns true if invincibility is active.
Definition ServerPowerups.cpp:53
bool hasSpeedBoost(const MatchPlayerState &matchPlayer, const uint32_t serverTick)
Returns true if speed boost is active.
Definition ServerPowerups.cpp:58
bool hasMaxBombsBoost(const MatchPlayerState &matchPlayer, const uint32_t serverTick)
Returns true if max-bombs boost is active.
Definition ServerPowerups.cpp:68
void placeRoundPowerups(ServerState &state)
Deterministically seeds the current round's hidden powerups under random bricks.
Definition ServerPowerups.cpp:123
void refreshMatchPlayerPowerupLoadout(const ServerState &state, MatchPlayerState &matchPlayer)
Refreshes one match player's derived bomb loadout.
Definition ServerPowerups.cpp:73