|
VoltMod
C++23 framework for CS2 server plugins
|
Report player pawn moves through CBaseEntity::Teleport. More...
#include <Teleport.hpp>
Public Member Functions | |
| Teleport (EntitySystem &entities, const Bindings &bindings) | |
| Teleport (const Teleport &)=delete | |
| Teleport & | operator= (const Teleport &)=delete |
| Status | Available () const |
Public Attributes | |
| Event< int > | Before |
Report player pawn moves through CBaseEntity::Teleport.
The hook installs on the first subscription and covers every pawn sharing the CCSPlayerPawn vtable, including respawns. Spawning raises the event as well, so consumers interested only in mid-life teleports must filter spawn events.
The service keeps no teleport history. Consumers decide how long a teleport remains relevant and which clock to use.
Definition at line 28 of file Teleport.hpp.
| VoltMod::Teleport::Teleport | ( | EntitySystem & | entities, |
| const Bindings & | bindings | ||
| ) |
entities resolves the teleported pawn's slot and bindings supplies the Teleport slot and class vtable. Both must outlive it; the Runtime declares them above.
Definition at line 24 of file Teleport.cpp.
References Before, and VoltMod::HookTeleport().
| Status VoltMod::Teleport::Available | ( | ) | const |
Why teleports cannot be tracked: the CBaseEntity::Teleport slot did not bind.
Definition at line 31 of file Teleport.cpp.
References VoltMod::Bindings::Teleport, and VoltMod::Error::Unsupported().
A player's pawn is about to be teleported.
Definition at line 42 of file Teleport.hpp.
Referenced by Teleport().