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

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"

Detailed Description

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.

Member Function Documentation

◆ From()

BulletImpact VoltMod::BulletImpact::From ( IGameEvent & e)
static

Definition at line 9 of file BulletImpact.cpp.

Member Data Documentation

◆ EventName

std::string_view VoltMod::BulletImpact::EventName = "bullet_impact"
staticconstexpr

Definition at line 19 of file BulletImpact.hpp.

◆ ShooterSlot

int VoltMod::BulletImpact::ShooterSlot = -1

Definition at line 20 of file BulletImpact.hpp.

◆ TruncatedUserId

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.

◆ X

float VoltMod::BulletImpact::X = 0.0f

Definition at line 23 of file BulletImpact.hpp.

◆ Y

float VoltMod::BulletImpact::Y = 0.0f

Definition at line 24 of file BulletImpact.hpp.

◆ Z

float VoltMod::BulletImpact::Z = 0.0f

Definition at line 25 of file BulletImpact.hpp.


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