pub struct PlayerState {
pub health: i32,
pub armor: i32,
pub helmet: bool,
pub defusekit: bool,
pub flashed: i32,
pub smoked: i32,
pub burning: i32,
pub money: i32,
pub round_kills: i32,
pub round_killhs: i32,
pub round_totaldmg: i32,
pub equip_value: i32,
}Expand description
Volatile per-tick state. Mirrors player_state block in the GSI cfg.
Fields§
§health: i32HP (0..=100). 0 means dead.
armor: i32Armor value (0..=100).
helmet: boolWhether the player has a helmet.
defusekit: boolWhether the player carries a defuse kit (CT only).
flashed: i32Flash blindness level, 0..=255.
smoked: i32Smoke obscurance level, 0..=255.
burning: i32Molotov burning level, 0..=255.
money: i32Cash on hand.
round_kills: i32Kills accumulated in the current round.
round_killhs: i32Headshot kills accumulated in the current round.
round_totaldmg: i32Total damage dealt in the current round.
equip_value: i32Total equipment value carried.
Trait Implementations§
Source§impl Clone for PlayerState
impl Clone for PlayerState
Source§fn clone(&self) -> PlayerState
fn clone(&self) -> PlayerState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlayerState
impl Debug for PlayerState
Source§impl Default for PlayerState
impl Default for PlayerState
Source§fn default() -> PlayerState
fn default() -> PlayerState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PlayerState
impl<'de> Deserialize<'de> for PlayerState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PlayerState
impl PartialEq for PlayerState
Source§impl Serialize for PlayerState
impl Serialize for PlayerState
impl StructuralPartialEq for PlayerState
Auto Trait Implementations§
impl Freeze for PlayerState
impl RefUnwindSafe for PlayerState
impl Send for PlayerState
impl Sync for PlayerState
impl Unpin for PlayerState
impl UnsafeUnpin for PlayerState
impl UnwindSafe for PlayerState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more