VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
VoltMod::MovementFreeze Class Reference

Holds one pawn still and gives its move type back to that pawn only, so a player who respawns while held never inherits the dead body's. Keep one per player. More...

#include <MovementFreeze.hpp>

Public Member Functions

void Hold (const Pawn &pawn)
 
void Release (const Pawn &pawn)
 
void Sync (const Pawn &pawn)
 
 operator bool () const noexcept
 

Detailed Description

Holds one pawn still and gives its move type back to that pawn only, so a player who respawns while held never inherits the dead body's. Keep one per player.

Definition at line 13 of file MovementFreeze.hpp.

Member Function Documentation

◆ Hold()

void VoltMod::MovementFreeze::Hold ( const Pawn &  pawn)

Freeze pawn. Does nothing when a pawn is already held, or when pawn cannot be.

Definition at line 6 of file MovementFreeze.cpp.

References VoltMod::Schema::MOVETYPE_NONE, and VoltMod::ReadFile().

Referenced by Sync().

◆ operator bool()

VoltMod::MovementFreeze::operator bool ( ) const
inlineexplicitnoexcept

Whether a pawn is being held.

Definition at line 27 of file MovementFreeze.hpp.

◆ Release()

void VoltMod::MovementFreeze::Release ( const Pawn &  pawn)

Give pawn its move type back if it is the one being held, then forget it.

Definition at line 19 of file MovementFreeze.cpp.

References VoltMod::ReadFile().

◆ Sync()

void VoltMod::MovementFreeze::Sync ( const Pawn &  pawn)

Carry the hold across a respawn: forget a replaced pawn without writing to it, then hold pawn.

Definition at line 33 of file MovementFreeze.cpp.

References Hold(), and VoltMod::ReadFile().


The documentation for this class was generated from the following files: