|
VoltMod
C++23 framework for CS2 server plugins
|
A player's own weapon drops, from CCSPlayer_WeaponServices::DropWeapon.
More...
#include <WeaponDrop.hpp>
Public Member Functions | |
| WeaponDrop (EntitySystem &entities, const Bindings &bindings) | |
| WeaponDrop (const WeaponDrop &)=delete | |
| WeaponDrop & | operator= (const WeaponDrop &)=delete |
| Status | Available () const |
Public Attributes | |
| Event< WeaponDropRequest & > | Before |
A player's own weapon drops, from CCSPlayer_WeaponServices::DropWeapon.
The drop key (G) reaches the server here, not as a drop command. The hook runs before the game's own checks, so it sees the key even while mp_death_drop_gun 0 or mp_drop_knife_enable 0 keep the weapon in hand. It installs on the first Before subscription.
Game-thread only.
Definition at line 43 of file WeaponDrop.hpp.
| VoltMod::WeaponDrop::WeaponDrop | ( | EntitySystem & | entities, |
| const Bindings & | bindings | ||
| ) |
entities resolves the dropping player and bindings supplies the drop function. Both must outlive this service; the Runtime declares them above.
Definition at line 11 of file WeaponDrop.cpp.
|
delete |
| Status VoltMod::WeaponDrop::Available | ( | ) | const |
Why drops cannot be hooked: the drop signature did not bind.
Definition at line 39 of file WeaponDrop.cpp.
|
delete |
| Event<WeaponDropRequest&> VoltMod::WeaponDrop::Before |
Raised before the game handles a player's drop.
Definition at line 57 of file WeaponDrop.hpp.