VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
DamageLayout.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5#include <entityhandle.h>
6#include <gametrace.h>
7#include <mathlib/vector.h>
8#include <shareddefs.h>
9
10namespace VoltMod
11{
12
13/** CTakeDamageInfo as of server build 2000908, from CS2Fixes. Only the leading fields are named;
14 * the engine's constructor fills the rest. */
16{
17 void* VTable;
22 CEntityHandle Inflictor;
23 CEntityHandle Attacker;
24 CEntityHandle Ability;
25 float Damage;
27 int32_t DamageType;
28 uint8_t Rest[200];
29};
30static_assert(offsetof(EngineDamageInfo, Inflictor) == 0x38);
31static_assert(offsetof(EngineDamageInfo, Damage) == 0x44);
32static_assert(offsetof(EngineDamageInfo, DamageType) == 0x4C);
33static_assert(sizeof(EngineDamageInfo) == 280);
34
35/** CTakeDamageResult as of server build 2000908, from CS2Fixes. */
55static_assert(offsetof(EngineDamageResult, DamageFlags) == 72);
56static_assert(sizeof(EngineDamageResult) == 96);
57
58} // namespace VoltMod
Every entity's damage, from CBaseEntity::TakeDamageOld, and a way to deal it.
Definition Damage.hpp:80
::Vector Vector
Definition Math.hpp:12
uint8_t DestructibleHitGroupRequests[16]
TakeDamageFlags_t DamageFlags
EngineDamageInfo * OriginatingInfo