Struct airmash_protocol::Upgrades
source · [−]Expand description
Upgrade info that a client needs to know about to calculate movement. This also includes the shielded state of the player.
Note that since a player should never have more than
5 upgrades on the official server, protocol-v5
can
only represent amounts of speed upgrades in the range
0 to 7.
Used in:
Login
, specificallyLoginPlayer
PlayerUpdate
PlayerRespawn
PlayerUpgrade
Fields
speed: u8
The number of speed upgrades that the player currently has equipped.
Note that only the first 3 bits of this are used in protocol-v5. Any values greater than 7 will be mangled.
shield: bool
Whether the player has a shield.
While both this and inferno
can be
set at the same time, that doesn’t make
sense within the framework of the game.
inferno: bool
Whether the player has an inferno.
While both this and shield
can be
set at the same time, that doesn’t make
sense within the framework of the game.
Trait Implementations
sourceimpl<'de> DeserializeV5<'de> for Upgrades
impl<'de> DeserializeV5<'de> for Upgrades
fn deserialize(de: &mut AirmashDeserializerV5<'de>) -> Result<Self>
sourceimpl SerializeV5 for Upgrades
impl SerializeV5 for Upgrades
fn serialize(&self, ser: &mut AirmashSerializerV5<'_>) -> Result
impl Copy for Upgrades
impl Eq for Upgrades
impl StructuralEq for Upgrades
impl StructuralPartialEq for Upgrades
Auto Trait Implementations
impl RefUnwindSafe for Upgrades
impl Send for Upgrades
impl Sync for Upgrades
impl Unpin for Upgrades
impl UnwindSafe for Upgrades
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more