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
4#include <string_view>
5
6namespace 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 */
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. */
23 float X = 0.0f;
24 float Y = 0.0f;
25 float Z = 0.0f;
27};
28
29} // namespace VoltMod
static std::string ReadFile(const std::filesystem::path &path)
Definition Loader.cpp:56
One bullet landing, fired once per impact (so a shotgun blast produces several).
static constexpr std::string_view EventName
static BulletImpact From(IGameEvent &e)