Skip to content

Commit 2bb66e9

Browse files
committed
Update CTakeDamageInfo & CTakeDamageResult
1 parent 71d7d19 commit 2bb66e9

1 file changed

Lines changed: 18 additions & 20 deletions

File tree

src/cs2_sdk/entity/ctakedamageinfo.h

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ enum DamageTypes_t : uint32_t
4747
DMG_HEADSHOT = 1 << 23, // 0x800000
4848
};
4949

50-
enum TakeDamageFlags_t : uint32_t
50+
enum TakeDamageFlags_t : uint64_t
5151
{
5252
DFLAG_NONE = 0, // 0x0
5353
DFLAG_SUPPRESS_HEALTH_CHANGES = 1 << 0, // 0x1
@@ -123,31 +123,26 @@ class CTakeDamageInfo
123123
[[maybe_unused]] uint8_t m_nUnknown1[0x2]; // 0x66
124124

125125
public:
126-
CGameTrace* m_pTrace; // 0x68 | 104
127-
TakeDamageFlags_t m_nDamageFlags; // 0x70 | 112
126+
CGameTrace* m_pTrace; // 0x68 | 104
127+
TakeDamageFlags_t m_nDamageFlags; // 0x70 | 112
128+
HitGroup_t m_iHitGroupId; // 0x78 | 120
129+
int32_t m_nNumObjectsPenetrated; // 0x7c | 124
130+
float m_flFriendlyFireDamageReductionRatio; // 0x80 | 128
131+
bool m_bStoppedBullet; // 0x84 | 132
128132

129133
private:
130-
[[maybe_unused]] uint8_t m_sDamageSourceName[0x8]; // 0x78 | 120
134+
uint8_t m_nUnknown2[0x58]; // 0x88 | 136
131135

132136
public:
133-
HitGroup_t m_iHitGroupId; // 0x80 | 128
134-
int32_t m_nNumObjectsPenetrated; // 0x84 | 132
135-
float m_flFriendlyFireDamageReductionRatio; // 0x88 | 136
136-
private:
137-
uint8_t m_nUnknown2[0x5C]; // 0x9c | 140
138-
public:
139-
void* m_hScriptInstance; // 0xe8 | 232
140-
AttackerInfo_t m_AttackerInfo; // 0xf0 | 240
141-
private:
142-
[[maybe_unused]] uint8_t m_nUnknown3[0x1C]; // 0x104 | 260
143-
144-
public:
145-
bool m_bInTakeDamageFlow; // 0x120 | 288
137+
void* m_hScriptInstance; // 0xe0 | 224
138+
AttackerInfo_t m_AttackerInfo; // 0xe8 | 232
139+
CUtlVector<int> m_nDestructibleHitGroupsToForceDestroy; // 0x100 | 256
140+
bool m_bInTakeDamageFlow; // 0x118 | 280
146141

147142
private:
148-
[[maybe_unused]] int32_t m_nUnknown4; // 0x124 | 292
143+
[[maybe_unused]] int32_t m_nUnknown4; // 0x11c | 284
149144
};
150-
static_assert(sizeof(CTakeDamageInfo) == 296);
145+
static_assert(sizeof(CTakeDamageInfo) == 288);
151146

152147
struct CTakeDamageResult
153148
{
@@ -158,7 +153,10 @@ struct CTakeDamageResult
158153
float m_flPreModifiedDamage;
159154
int32_t m_nTotalledHealthLost;
160155
int32_t m_nTotalledDamageDealt;
156+
float m_flTotalledPreModifiedDamage;
161157
bool m_bWasDamageSuppressed;
158+
bool m_bSuppressFlinch;
159+
HitGroup_t m_nOverrideFlinchHitGroup;
162160

163161
void CopyFrom(CTakeDamageInfo* pInfo)
164162
{
@@ -186,4 +184,4 @@ struct CTakeDamageResult
186184
{
187185
}
188186
};
189-
static_assert(sizeof(CTakeDamageResult) == 40);
187+
static_assert(sizeof(CTakeDamageResult) == 48);

0 commit comments

Comments
 (0)