|
VoltMod
C++23 framework for CS2 server plugins
|
One bullet landing, fired once per impact (so a shotgun blast produces several). More...
#include <BulletImpact.hpp>
Static Public Member Functions | |
| static BulletImpact | From (IGameEvent &e) |
Public Attributes | |
| int | ShooterSlot = -1 |
| int | TruncatedUserId = 0 |
| float | X = 0.0f |
| float | Y = 0.0f |
| float | Z = 0.0f |
Static Public Attributes | |
| static constexpr std::string_view | EventName = "bullet_impact" |
One bullet landing, fired once per impact (so a shotgun blast produces several).
Written by hand, not generated: the engine truncates this event's userid to its low byte, so it does not round-trip to a slot. ShooterSlot is a best-effort decode, -1 whenever the truncated value names no live player. Correlate impacts by tick proximity (with TruncatedUserId as a disambiguator), never by identity alone.
Definition at line 17 of file BulletImpact.hpp.
|
static |
Definition at line 9 of file BulletImpact.cpp.
References VoltMod::ReadFile(), and ShooterSlot.
|
staticconstexpr |
Definition at line 19 of file BulletImpact.hpp.
| int VoltMod::BulletImpact::ShooterSlot = -1 |
Definition at line 20 of file BulletImpact.hpp.
Referenced by From().
| int VoltMod::BulletImpact::TruncatedUserId = 0 |
Raw userid as the engine sent it - the shooter's userid masked to its low byte.
Definition at line 22 of file BulletImpact.hpp.
| float VoltMod::BulletImpact::X = 0.0f |
Definition at line 23 of file BulletImpact.hpp.
| float VoltMod::BulletImpact::Y = 0.0f |
Definition at line 24 of file BulletImpact.hpp.
| float VoltMod::BulletImpact::Z = 0.0f |
Definition at line 25 of file BulletImpact.hpp.