VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
CBaseEntity.cpp
Go to the documentation of this file.
1// Generated by `voltmod framework schemagen`. Do not edit.
2
3#include "Schema/Layout.hpp"
4#include "Schema/Notify.hpp"
5
9
10namespace VoltMod::Schema
11{
12
13// ---- CBaseEntity -------------------------------------------------
14static const int32_t& kCBaseEntity_SubclassIdAddress = GeneratedFields[1].Offset; // CUtlStringToken
15static const int32_t& kCBaseEntity_Health = GeneratedFields[2].Offset; // int32
16static const int32_t& kCBaseEntity_MaxHealth = GeneratedFields[3].Offset; // int32
17static const int32_t& kCBaseEntity_GravityScale = GeneratedFields[4].Offset; // float32
18static const int32_t& kCBaseEntity_TeamNum = GeneratedFields[5].Offset; // uint8
19static const int32_t& kCBaseEntity_LifeState = GeneratedFields[6].Offset; // uint8
20static const int32_t& kCBaseEntity_Flags = GeneratedFields[7].Offset; // uint32
21static const int32_t& kCBaseEntity_AbsVelocity = GeneratedFields[8].Offset; // Vector
22static const int32_t& kCBaseEntity_MoveTypeRaw = GeneratedFields[9].Offset; // MoveType_t
23static const int32_t& kCBaseEntity_ActualMoveType = GeneratedFields[10].Offset; // MoveType_t
24static const int32_t& kCBaseEntity_GroundEntity = GeneratedFields[11].Offset; // CHandle< CBaseEntity >
25static const int32_t& kCBaseEntity_OwnerEntity = GeneratedFields[12].Offset; // CHandle< CBaseEntity >
26static const int32_t& kCBaseEntity_BodyComponent = GeneratedFields[13].Offset; // CBodyComponent*
27
32
33int32_t CBaseEntity::Health() const
34{
35 if (!_base)
36 {
37 return {};
38 }
39
41}
42
43void CBaseEntity::SetHealth(int32_t value) const
44{
45 if (!_base)
46 {
47 return;
48 }
49
52}
53
55{
56 if (!_base)
57 {
58 return {};
59 }
60
62}
63
64void CBaseEntity::SetMaxHealth(int32_t value) const
65{
66 if (!_base)
67 {
68 return;
69 }
70
73}
74
76{
77 if (!_base)
78 {
79 return {};
80 }
81
83}
84
85void CBaseEntity::SetGravityScale(float value) const
86{
87 if (!_base)
88 {
89 return;
90 }
91
94}
95
97{
98 if (!_base)
99 {
100 return {};
101 }
102
104}
105
107{
108 if (!_base)
109 {
110 return;
111 }
112
115}
116
118{
119 if (!_base)
120 {
121 return {};
122 }
123
125}
126
127void CBaseEntity::SetLifeState(uint8_t value) const
128{
129 if (!_base)
130 {
131 return;
132 }
133
136}
137
138uint32_t CBaseEntity::Flags() const
139{
140 if (!_base)
141 {
142 return {};
143 }
144
146}
147
148void CBaseEntity::SetFlags(uint32_t value) const
149{
150 if (!_base)
151 {
152 return;
153 }
154
157}
158
160{
161 if (!_base)
162 {
163 return {};
164 }
165
167}
168
170{
171 if (!_base)
172 {
173 return;
174 }
175
177}
178
180{
181 if (!_base)
182 {
183 return {};
184 }
185
187}
188
190{
191 if (!_base)
192 {
193 return;
194 }
195
198}
199
201{
202 if (!_base)
203 {
204 return {};
205 }
206
208}
209
211{
212 if (!_base)
213 {
214 return;
215 }
216
218}
219
221{
222 if (!_base)
223 {
224 return {};
225 }
226
228}
229
231{
232 if (!_base)
233 {
234 return;
235 }
236
239}
240
242{
243 if (!_base)
244 {
245 return {};
246 }
247
249}
250
252{
253 if (!_base)
254 {
255 return;
256 }
257
260}
261
263{
264 if (!_base)
265 {
266 return {};
267 }
268
270}
271
272} // namespace VoltMod::Schema
Typed read/write of engine fields at a base pointer + byte offset.
void SetFlags(uint32_t value) const
void SetAbsVelocity(Vector value) const
void SetGravityScale(float value) const
void SetHealth(int32_t value) const
void SetActualMoveType(MoveType_t value) const
void SetMoveTypeRaw(MoveType_t value) const
EntityRef OwnerEntity() const
MoveType_t ActualMoveType() const
EntityRef GroundEntity() const
void SetOwnerEntity(EntityRef value) const
void SetTeamNum(VoltMod::Team value) const
void SetMaxHealth(int32_t value) const
VoltMod::Team TeamNum() const
void SetLifeState(uint8_t value) const
CBodyComponent BodyComponent() const
void SetGroundEntity(EntityRef value) const
MoveType_t MoveTypeRaw() const
int32_t _ownerOffset
Definition View.hpp:38
::CEntityInstance * _owner
Definition View.hpp:37
static const int32_t & kCBaseEntity_TeamNum
static const int32_t & kCBaseEntity_AbsVelocity
static const int32_t & kCBaseEntity_GravityScale
static const int32_t & kCBaseEntity_SubclassIdAddress
static const int32_t & kCBaseEntity_MoveTypeRaw
static const int32_t & kCBaseEntity_LifeState
static const int32_t & kCBaseEntity_OwnerEntity
static const int32_t & kCBaseEntity_ActualMoveType
void NotifyEntity(CEntityInstance *entity, int32_t offset)
Definition Notify.cpp:10
FieldLayout GeneratedFields[]
Definition Layout.cpp:8
static const int32_t & kCBaseEntity_GroundEntity
static const int32_t & kCBaseEntity_MaxHealth
static const int32_t & kCBaseEntity_BodyComponent
static const int32_t & kCBaseEntity_Health
static const int32_t & kCBaseEntity_Flags
T * MemberPtr(void *base, std::ptrdiff_t offset) noexcept
::Vector Vector
Definition Math.hpp:12