VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
BulletImpact.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
VoltMod/Engine/EngineTypes.hpp
>
4
#include <string_view>
5
6
namespace
VoltMod
7
{
8
9
/**
10
* @brief One bullet landing, fired once per impact (so a shotgun blast produces several).
11
*
12
* Written by hand, not generated: the engine truncates this event's `userid` to its low byte, so it
13
* does not round-trip to a slot. @ref ShooterSlot is a best-effort decode, -1 whenever the truncated
14
* value names no live player. Correlate impacts by tick proximity (with @ref TruncatedUserId as a
15
* disambiguator), never by identity alone.
16
*/
17
struct
BulletImpact
18
{
19
static
constexpr
std::string_view
EventName
=
"bullet_impact"
;
20
int
ShooterSlot
= -1;
21
/** Raw `userid` as the engine sent it - the shooter's userid masked to its low byte. */
22
int
TruncatedUserId
= 0;
23
float
X
= 0.0f;
24
float
Y
= 0.0f;
25
float
Z
= 0.0f;
26
static
BulletImpact
From
(
IGameEvent
&
e
);
27
};
28
29
}
// namespace VoltMod
EngineTypes.hpp
VoltMod
Definition
Options.hpp:13
VoltMod::ReadFile
static std::string ReadFile(const std::filesystem::path &path)
Definition
Loader.cpp:56
VoltMod::BulletImpact
One bullet landing, fired once per impact (so a shotgun blast produces several).
Definition
BulletImpact.hpp:18
VoltMod::BulletImpact::Z
float Z
Definition
BulletImpact.hpp:25
VoltMod::BulletImpact::EventName
static constexpr std::string_view EventName
Definition
BulletImpact.hpp:19
VoltMod::BulletImpact::From
static BulletImpact From(IGameEvent &e)
Definition
BulletImpact.cpp:9
VoltMod::BulletImpact::ShooterSlot
int ShooterSlot
Definition
BulletImpact.hpp:20
VoltMod::BulletImpact::Y
float Y
Definition
BulletImpact.hpp:24
VoltMod::BulletImpact::TruncatedUserId
int TruncatedUserId
Definition
BulletImpact.hpp:22
VoltMod::BulletImpact::X
float X
Definition
BulletImpact.hpp:23
include
VoltMod
Events
BulletImpact.hpp
Generated by
1.9.8