QcDrowning Class
Air under water in the server tick (decision E-955): players and creatures with their eyes under water lose their air (QcAirSupply) and then drown while the game rule drowningDamage holds; out of the water the air comes back. More...
| Header: | #include <server/gameplay/QcDrowning.h> |
Public Functions
| void | tick() |
Static Public Members
| bool | differs(QcMsg::PlayerAir sent, QcMsg::PlayerAir now) |
Detailed Description
Spectators, creative players and the dead breathe freely, as do creatures that breathe under water (QcMobDefinition::breathesUnderWater: swimmers, divers, fish, golems) and dormant ones. A player hears of his air with a PlayerAir only when what his HUD shows changes.
Member Function Documentation
[static] bool QcDrowning::differs(QcMsg::PlayerAir sent, QcMsg::PlayerAir now)
Returns whether the HUD of a player shows something else for now than for sent: other bubbles, a full breath gained or lost, the eyes under water or out of it.
void QcDrowning::tick()
The air of every playing player and every creature in a simulated tick.