QcMsg::PlayerHealth Struct
struct QcMsg::PlayerHealthServer -> client: the receiving player's health; dead players wait for Respawn. More...
| Header: | #include <common/protocol/QcPlayerMessages.h> |
Public Variables
| bool | burning |
| bool | dead |
| QList<QcStatusEffect> | effects |
| double | health |
| bool | hurt |
| std::optional<float> | hurtFrom |
| double | maxHealth |
Detailed Description
Also sent when the player catches fire or stops burning (burning, decision E-393), and when his status effects change and every second while he has any (effects, decision E-450).
Member Variable Documentation
bool PlayerHealth::burning
Whether the player burns.
bool PlayerHealth::dead
Whether the player is dead.
QList<QcStatusEffect> PlayerHealth::effects
The player's status effects.
bool PlayerHealth::hurt
Whether a fresh hit hurt the player just now (decision E-971): the client tilts the view.
std::optional<float> PlayerHealth::hurtFrom
The world yaw in degrees from the player towards where that hit came from (the attacker); none for a hit without a direction (a fall, fire, hunger) or no hit.