CBreakableProp::Break
0x007ec860 · 7064 bytes · __thiscall
_ZN14CBreakableProp5BreakEP11CBaseEntityRK15CTakeDamageInfo
Decompiled
undefined (3 params)
/* CBreakableProp::Break(CBaseEntity*, CTakeDamageInfo const&) */
void __thiscall
CBreakableProp::Break(CBreakableProp *this,CBaseEntity *param_1,CTakeDamageInfo *param_2)
{
CBreakableProp CVar1;
CBreakableProp CVar2;
CBreakableProp CVar3;
undefined4 uVar4;
undefined4 uVar5;
bool bVar6;
char cVar7;
int iVar8;
int *piVar9;
IPhysicsObject *pIVar10;
uint uVar11;
Vector *pVVar12;
char *pcVar13;
float *pfVar14;
undefined4 uVar15;
int iVar16;
CInferno *pCVar17;
undefined *puVar18;
code *pcVar19;
CBaseEntity *pCVar20;
CBaseCombatCharacter *pCVar21;
undefined4 *puVar22;
int in_GS_OFFSET;
byte bVar23;
float fVar24;
float fVar25;
CBaseEntity *local_ae8;
char *local_ae0 [3];
undefined4 local_ad4;
undefined4 local_ad0;
undefined4 local_acc;
undefined4 local_ac8;
undefined4 local_ac4;
undefined4 local_ac0;
undefined4 local_abc;
undefined4 local_ab8;
undefined4 local_ab4;
undefined4 local_ab0;
undefined4 local_aac;
undefined4 local_aa8;
float local_aa4;
float local_aa0;
float local_a9c;
float local_a98;
float local_a94;
float local_a90;
float local_a8c;
float local_a88;
float local_a84;
undefined4 *local_a7c;
undefined4 *local_a78;
undefined4 *local_a74;
undefined4 *local_a70;
float local_a6c;
float local_a68;
float local_a64;
undefined4 local_a5c;
undefined4 local_a58;
undefined4 local_a54;
undefined4 local_a4c;
undefined4 local_a48;
undefined4 local_a44;
undefined4 local_a3c;
undefined1 local_a38;
undefined1 local_a37;
undefined **local_a28 [3];
float local_a1c;
float local_a18;
float local_a14;
Vector local_a10 [42];
byte local_9e6;
undefined4 local_220;
undefined4 local_21c [63];
undefined4 local_120;
undefined4 local_11c [63];
int local_20;
bVar23 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
(**(code **)(*(int *)this + 0x20))(local_ae0);
pcVar13 = "";
if (local_ae0[0] != (char *)0x0) {
pcVar13 = local_ae0[0];
}
iVar8 = V_stristr(pcVar13,"crate");
if ((iVar8 != 0) &&
((((param_1 != (CBaseEntity *)0x0 &&
(cVar7 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar7 != '\0')) ||
((uVar11 = *(uint *)(this + 0x14a4), uVar11 != 0xffffffff &&
((((puVar18 = g_pEntityList + (uVar11 & 0xfff) * 0x10, puVar18 != (undefined *)0xfffffffc &&
(*(uint *)(puVar18 + 8) == uVar11 >> 0xc)) &&
(piVar9 = *(int **)(puVar18 + 4), piVar9 != (int *)0x0)) &&
(cVar7 = (**(code **)(*piVar9 + 0x16c))(piVar9), cVar7 != '\0')))))) ||
(((param_1 != (CBaseEntity *)0x0 &&
(iVar8 = __dynamic_cast(param_1,&CBaseEntity::typeinfo,&CPropVehicleDriveable::typeinfo,0),
iVar8 != 0)) &&
((piVar9 = (int *)(**(code **)(*(int *)param_1 + 0x3d0))(param_1), piVar9 != (int *)0x0 &&
(cVar7 = (**(code **)(*piVar9 + 0x16c))(piVar9), cVar7 != '\0')))))))) {
(**(code **)(*(int *)gamestats + 0x68))(gamestats);
}
piVar9 = (int *)(**(code **)(*gameeventmanager + 0x1c))
(gameeventmanager,"break_prop",0,&g_BreakPropEvent);
if (piVar9 != (int *)0x0) {
if ((param_1 == (CBaseEntity *)0x0) ||
(cVar7 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar7 == '\0')) {
(**(code **)(*piVar9 + 0x30))(piVar9,"userid");
pcVar19 = *(code **)(*piVar9 + 0x30);
}
else {
pcVar19 = *(code **)(*piVar9 + 0x30);
cVar7 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
pCVar20 = (CBaseEntity *)0x0;
if (cVar7 != '\0') {
pCVar20 = param_1;
}
(**(code **)(*engine + 0x40))(engine,*(undefined4 *)(pCVar20 + 0x30));
(*pcVar19)(piVar9,"userid");
pcVar19 = *(code **)(*piVar9 + 0x30);
}
(*pcVar19)(piVar9,"entindex");
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar9);
}
if (this[0x105] != (CBreakableProp)0x0) {
(**(code **)(*(int *)this + 0x224))(this,this + 0x105);
this[0x105] = (CBreakableProp)0x0;
}
COutputEvent::FireOutput((COutputEvent *)(this + 0x13fc),param_1,(CBaseEntity *)this,0.0);
pIVar10 = (IPhysicsObject *)(**(code **)(*(int *)this + 0x3b0))(this);
CCollisionProperty::SetSolidFlags
((CCollisionProperty *)(this + 0x194),(uint)(*(ushort *)(this + 0x1b4) | 4));
if (pIVar10 == (IPhysicsObject *)0x0) {
uVar11 = *(uint *)(this + 0x14c);
if ((uVar11 & 0x1000) != 0) {
CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
uVar11 = *(uint *)(this + 0x14c);
}
local_ad4 = *(undefined4 *)(this + 0x274);
local_ad0 = *(undefined4 *)(this + 0x278);
local_acc = *(undefined4 *)(this + 0x27c);
local_ac8 = *(undefined4 *)(this + 0x288);
local_ac4 = *(undefined4 *)(this + 0x280);
local_ac0 = *(undefined4 *)(this + 0x284);
if ((uVar11 & 0x800) == 0) {
local_abc = *(undefined4 *)(this + 0x2e0);
local_ab8 = *(undefined4 *)(this + 0x2e4);
local_ab4 = *(undefined4 *)(this + 0x2e8);
uVar11 = 0;
}
else {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
local_abc = *(undefined4 *)(this + 0x2e0);
local_ab8 = *(undefined4 *)(this + 0x2e4);
local_ab4 = *(undefined4 *)(this + 0x2e8);
uVar11 = 0;
if ((*(uint *)(this + 0x14c) & 0x800) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
uVar11 = *(uint *)(this + 0x14c) & 0x800;
}
}
local_ab0 = *(undefined4 *)(this + 0x37c);
local_aac = *(undefined4 *)(this + 0x380);
local_aa8 = *(undefined4 *)(this + 900);
}
else {
(**(code **)(*(int *)pIVar10 + 0xd4))(pIVar10,&local_ad4);
(**(code **)(*(int *)pIVar10 + 0xc4))(pIVar10,&local_abc);
(**(code **)(*(int *)pIVar10 + 0x6c))(pIVar10);
uVar11 = *(uint *)(this + 0x14c) & 0x800;
}
if (uVar11 != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
pCVar20 = (CBaseEntity *)0x0;
PhysBreakSound(this,*(undefined4 *)(this + 0x238),*(undefined4 *)(this + 0x2e0),
*(undefined4 *)(this + 0x2e4));
uVar11 = *(uint *)(param_2 + 0x34);
if (((uVar11 != 0xffffffff) &&
(puVar18 = g_pEntityList + (uVar11 & 0xfff) * 0x10, puVar18 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar18 + 8) == uVar11 >> 0xc)) {
pCVar20 = *(CBaseEntity **)(puVar18 + 4);
}
uVar11 = *(uint *)(this + 0x153c);
if (((uVar11 == 0xffffffff) ||
(puVar18 = g_pEntityList + (uVar11 & 0xfff) * 0x10, puVar18 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar18 + 8) != uVar11 >> 0xc ||
(local_ae8 = *(CBaseEntity **)(puVar18 + 4), local_ae8 == (CBaseEntity *)0x0)))) {
uVar11 = *(uint *)(this + 0x14a4);
local_ae8 = pCVar20;
if (((uVar11 != 0xffffffff) &&
(puVar18 = g_pEntityList + (uVar11 & 0xfff) * 0x10, puVar18 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar18 + 8) == uVar11 >> 0xc &&
((*(CBaseEntity **)(puVar18 + 4) != (CBaseEntity *)0x0 &&
(*(float *)(gpGlobals + 0xc) - *(float *)(this + 0x14a8) <= 2.0)))))) {
local_ae8 = *(CBaseEntity **)(puVar18 + 4);
}
iVar8 = *(int *)(this + 0x1530);
if (iVar8 != 2) goto LAB_007ecbc3;
LAB_007ed3c0:
if (((byte)this[0x14d] & 8) == 0) {
fVar25 = *(float *)(this + 0x2e8);
fVar24 = 0.0;
local_a68 = 0.0;
local_a6c = 0.0;
local_a64 = fVar25 - 999999.9;
local_a7c = (undefined4 *)*(float *)(this + 0x2e0);
local_a78 = (undefined4 *)*(float *)(this + 0x2e4);
}
else {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
fVar25 = *(float *)(this + 0x2e8);
local_a7c = *(undefined4 **)(this + 0x2e0);
local_a78 = *(undefined4 **)(this + 0x2e4);
local_a64 = fVar25 - 999999.9;
if (((byte)this[0x14d] & 8) == 0) {
fVar24 = 0.0;
local_a68 = 0.0;
local_a6c = 0.0;
}
else {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
local_a6c = (float)local_a7c - *(float *)(this + 0x2e0);
fVar25 = *(float *)(this + 0x2e8);
local_a68 = (float)local_a78 - *(float *)(this + 0x2e4);
fVar24 = local_a6c * local_a6c + local_a68 * local_a68;
local_a7c = (undefined4 *)*(float *)(this + 0x2e0);
local_a78 = (undefined4 *)*(float *)(this + 0x2e4);
}
}
local_a74 = (undefined4 *)(fVar25 + 10.0);
local_a64 = local_a64 - (float)local_a74;
local_a44 = 0;
local_a48 = 0;
local_a4c = 0;
local_a37 = local_a64 * local_a64 + fVar24 != 0.0;
local_a38 = 1;
local_a3c = 0;
local_a54 = 0;
local_a58 = 0;
local_a5c = 0;
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)&local_a8c,(IHandleEntity *)this,0,
(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))
(enginetrace,(AI_CriteriaSet *)&local_a7c,0x1400b,(CTraceFilterSimple *)&local_a8c);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine((Vector *)local_a28,(Vector *)&local_a1c,0xff,0,0,true,-1.0);
}
if ((local_9e6 & 4) == 0) {
local_a7c = (undefined4 *)0x0;
local_a78 = (undefined4 *)0x0;
local_a74 = (undefined4 *)0x0;
pCVar17 = (CInferno *)
CBaseEntity::Create("inferno",(Vector *)&local_a1c,(QAngle *)&local_a7c,local_ae8);
CInferno::StartBurning(pCVar17,(Vector *)&local_a1c,local_a10,(Vector *)&vec3_origin,0);
}
if (param_1 == (CBaseEntity *)0x0) {
local_220 = 0;
puVar22 = local_21c;
for (iVar8 = 0x3f; iVar8 != 0; iVar8 = iVar8 + -1) {
*puVar22 = 0;
puVar22 = puVar22 + (uint)bVar23 * -2 + 1;
}
}
else {
cVar7 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if (cVar7 != '\0') {
AI_CriteriaSet::AI_CriteriaSet((AI_CriteriaSet *)&local_a7c);
/* try { // try from 007ed57d to 007ed61c has its CatchHandler @ 007ee477 */
pcVar13 = (char *)SurvivorCharacterName(*(undefined4 *)(param_1 + 0x2ba0));
AI_CriteriaSet::AppendCriteria((AI_CriteriaSet *)&local_a7c,"Subject",pcVar13,1.0);
AI_CriteriaSet::AppendCriteria((AI_CriteriaSet *)&local_a7c,"ExplosionType","Molotov",1.0);
local_a8c = 1.4013e-45;
local_a88 = -NAN;
CAI_Concept::CAI_Concept((CAI_Concept *)&local_a98,"PropExplosion");
CResponseQueue::Add((CResponseQueue *)g_ResponseQueueManager._12_4_,
(CAI_Concept *)&local_a98,(AI_CriteriaSet *)&local_a7c,0.0,
(CFollowupTargetSpec_t *)&local_a8c,(CBaseEntity *)0x0);
AI_CriteriaSet::~AI_CriteriaSet((AI_CriteriaSet *)&local_a7c);
}
puVar22 = local_21c;
for (iVar8 = 0x3f; iVar8 != 0; iVar8 = iVar8 + -1) {
*puVar22 = 0;
puVar22 = puVar22 + (uint)bVar23 * -2 + 1;
}
local_220 = 0;
piVar9 = (int *)TheLog();
(**(code **)(*piVar9 + 0x14))(piVar9,param_1,&local_220,0x100);
}
puVar22 = local_11c;
for (iVar8 = 0x3f; iVar8 != 0; iVar8 = iVar8 + -1) {
*puVar22 = 0;
puVar22 = puVar22 + (uint)bVar23 * -2 + 1;
}
local_120 = 0;
if (local_ae8 != (CBaseEntity *)0x0) {
piVar9 = (int *)TheLog();
(**(code **)(*piVar9 + 0x14))(piVar9,local_ae8,&local_120,0x100);
}
UTIL_LogPrintf("Fire prop detonated %.0f,%.0f,%.0f. Breaker:%s. Attacker:%s.\n",
(double)local_a1c,(double)local_a18,(double)local_a14,&local_220,&local_120);
bVar6 = true;
}
else {
iVar8 = *(int *)(this + 0x1530);
if (iVar8 == 2) goto LAB_007ed3c0;
LAB_007ecbc3:
if (iVar8 == 3) {
if (((byte)this[0x14d] & 8) == 0) {
fVar25 = *(float *)(this + 0x2e8);
fVar24 = 0.0;
local_a68 = 0.0;
local_a6c = 0.0;
local_a64 = fVar25 - 56755.84;
local_a78 = (undefined4 *)*(float *)(this + 0x2e4);
local_a7c = (undefined4 *)*(float *)(this + 0x2e0);
}
else {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
fVar25 = *(float *)(this + 0x2e8);
local_a7c = *(undefined4 **)(this + 0x2e0);
local_a78 = *(undefined4 **)(this + 0x2e4);
local_a64 = fVar25 - 56755.84;
if (((byte)this[0x14d] & 8) == 0) {
fVar24 = 0.0;
local_a68 = 0.0;
local_a6c = 0.0;
}
else {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
local_a6c = (float)local_a7c - *(float *)(this + 0x2e0);
fVar25 = *(float *)(this + 0x2e8);
local_a68 = (float)local_a78 - *(float *)(this + 0x2e4);
fVar24 = local_a6c * local_a6c + local_a68 * local_a68;
local_a78 = (undefined4 *)*(float *)(this + 0x2e4);
local_a7c = (undefined4 *)*(float *)(this + 0x2e0);
}
}
local_a74 = (undefined4 *)(fVar25 + 10.0);
local_a64 = local_a64 - (float)local_a74;
local_a44 = 0;
local_a48 = 0;
local_a4c = 0;
local_a37 = local_a64 * local_a64 + fVar24 != 0.0;
local_a38 = 1;
local_a3c = 0;
local_a54 = 0;
local_a58 = 0;
local_a5c = 0;
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)&local_a8c,(IHandleEntity *)this,0,
(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))
(enginetrace,(AI_CriteriaSet *)&local_a7c,0x1400b,(CTraceFilterSimple *)&local_a8c);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine((Vector *)local_a28,(Vector *)&local_a1c,0xff,0,0,true,-1.0);
}
if ((local_9e6 & 4) == 0) {
local_a7c = (undefined4 *)0x0;
local_a78 = (undefined4 *)0x0;
local_a74 = (undefined4 *)0x0;
pCVar17 = (CInferno *)
CBaseEntity::Create("fire_cracker_blast",(Vector *)&local_a1c,(QAngle *)&local_a7c
,local_ae8);
CInferno::StartBurning(pCVar17,(Vector *)&local_a1c,local_a10,(Vector *)&vec3_origin,0);
}
if (param_1 == (CBaseEntity *)0x0) {
local_220 = 0;
puVar22 = local_21c;
for (iVar8 = 0x3f; iVar8 != 0; iVar8 = iVar8 + -1) {
*puVar22 = 0;
puVar22 = puVar22 + (uint)bVar23 * -2 + 1;
}
}
else {
cVar7 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if (cVar7 != '\0') {
AI_CriteriaSet::AI_CriteriaSet((AI_CriteriaSet *)&local_a7c);
/* try { // try from 007edc9d to 007edd3c has its CatchHandler @ 007ee48f */
pcVar13 = (char *)SurvivorCharacterName(*(undefined4 *)(param_1 + 0x2ba0));
AI_CriteriaSet::AppendCriteria((AI_CriteriaSet *)&local_a7c,"Subject",pcVar13,1.0);
AI_CriteriaSet::AppendCriteria
((AI_CriteriaSet *)&local_a7c,"ExplosionType","Fireworks",1.0);
local_a8c = 1.4013e-45;
local_a88 = -NAN;
CAI_Concept::CAI_Concept((CAI_Concept *)&local_a98,"PropExplosion");
CResponseQueue::Add((CResponseQueue *)g_ResponseQueueManager._12_4_,
(CAI_Concept *)&local_a98,(AI_CriteriaSet *)&local_a7c,0.0,
(CFollowupTargetSpec_t *)&local_a8c,(CBaseEntity *)0x0);
AI_CriteriaSet::~AI_CriteriaSet((AI_CriteriaSet *)&local_a7c);
}
puVar22 = local_21c;
for (iVar8 = 0x3f; iVar8 != 0; iVar8 = iVar8 + -1) {
*puVar22 = 0;
puVar22 = puVar22 + (uint)bVar23 * -2 + 1;
}
local_220 = 0;
piVar9 = (int *)TheLog();
(**(code **)(*piVar9 + 0x14))(piVar9,param_1,&local_220,0x100);
}
puVar22 = local_11c;
for (iVar8 = 0x3f; iVar8 != 0; iVar8 = iVar8 + -1) {
*puVar22 = 0;
puVar22 = puVar22 + (uint)bVar23 * -2 + 1;
}
local_120 = 0;
if (local_ae8 != (CBaseEntity *)0x0) {
piVar9 = (int *)TheLog();
(**(code **)(*piVar9 + 0x14))(piVar9,local_ae8,&local_120,0x100);
}
UTIL_LogPrintf("Fire prop detonated %.0f,%.0f,%.0f. Breaker:%s. Attacker:%s.\n",
(double)local_a1c,(double)local_a18,(double)local_a14,&local_220,&local_120);
bVar6 = true;
}
else if (iVar8 == 1) {
if (*(char **)(this + 0x1538) != (char *)0x0) {
CBaseEntity::StopSound((CBaseEntity *)this,*(char **)(this + 0x1538));
}
pCVar21 = (CBaseCombatCharacter *)0x0;
if (local_ae8 != (CBaseEntity *)0x0) {
pCVar21 = (CBaseCombatCharacter *)(**(code **)(*(int *)local_ae8 + 0x144))(local_ae8);
}
uVar11 = *(uint *)(this + 0x14c);
if ((uVar11 & 0x1000) != 0) {
CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
uVar11 = *(uint *)(this + 0x14c);
}
if ((uVar11 & 0x800) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
pVVar12 = (Vector *)(**(code **)(*(int *)this + 0x288))(this);
piVar9 = (int *)CPipeBombProjectile::Create
(pVVar12,(QAngle *)(this + 0x37c),(Vector *)(this + 0x274),
(Vector *)&vec3_origin,pCVar21,0.1);
if (piVar9 != (int *)0x0) {
(**(code **)(*piVar9 + 0x56c))(piVar9);
}
CBaseEntity::EmitSound((CBaseEntity *)this,"PropaneTank.Burst",0.0,(float *)0x0);
if (param_1 == (CBaseEntity *)0x0) {
local_220 = 0;
puVar22 = local_21c;
for (iVar8 = 0x3f; iVar8 != 0; iVar8 = iVar8 + -1) {
*puVar22 = 0;
puVar22 = puVar22 + (uint)bVar23 * -2 + 1;
}
}
else {
cVar7 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if (cVar7 != '\0') {
AI_CriteriaSet::AI_CriteriaSet((AI_CriteriaSet *)local_a28);
/* try { // try from 007ed921 to 007ed9ba has its CatchHandler @ 007ee491 */
pcVar13 = (char *)SurvivorCharacterName(*(undefined4 *)(param_1 + 0x2ba0));
AI_CriteriaSet::AppendCriteria((AI_CriteriaSet *)local_a28,"Subject",pcVar13,1.0);
AI_CriteriaSet::AppendCriteria((AI_CriteriaSet *)local_a28,"ExplosionType","Grenade",1.0);
local_a7c = (undefined4 *)0x1;
local_a78 = (undefined4 *)0xffffffff;
CAI_Concept::CAI_Concept((CAI_Concept *)&local_a8c,"PropExplosion");
CResponseQueue::Add((CResponseQueue *)g_ResponseQueueManager._12_4_,
(CAI_Concept *)&local_a8c,(AI_CriteriaSet *)local_a28,0.0,
(CFollowupTargetSpec_t *)&local_a7c,(CBaseEntity *)0x0);
AI_CriteriaSet::~AI_CriteriaSet((AI_CriteriaSet *)local_a28);
}
puVar22 = local_21c;
for (iVar8 = 0x3f; iVar8 != 0; iVar8 = iVar8 + -1) {
*puVar22 = 0;
puVar22 = puVar22 + (uint)bVar23 * -2 + 1;
}
local_220 = 0;
piVar9 = (int *)TheLog();
(**(code **)(*piVar9 + 0x14))(piVar9,param_1,&local_220,0x100);
}
puVar22 = local_11c;
for (iVar8 = 0x3f; iVar8 != 0; iVar8 = iVar8 + -1) {
*puVar22 = 0;
puVar22 = puVar22 + (uint)bVar23 * -2 + 1;
}
local_120 = 0;
if (local_ae8 != (CBaseEntity *)0x0) {
piVar9 = (int *)TheLog();
(**(code **)(*piVar9 + 0x14))(piVar9,local_ae8,&local_120,0x100);
}
iVar8 = (**(code **)(*(int *)this + 0x288))(this);
fVar25 = *(float *)(iVar8 + 8);
iVar8 = (**(code **)(*(int *)this + 0x288))(this);
fVar24 = *(float *)(iVar8 + 4);
pfVar14 = (float *)(**(code **)(*(int *)this + 0x288))(this);
UTIL_LogPrintf("Explosion prop detonated %.0f,%.0f,%.0f. Breaker:%s. Attacker:%s.\n",
(double)*pfVar14,(double)fVar24,(double)fVar25,&local_220,&local_120);
bVar6 = true;
}
else if ((0.0 < *(float *)(this + 0x1498)) || (0.0 < *(float *)(this + 0x149c))) {
pCVar21 = (CBaseCombatCharacter *)0x0;
if (local_ae8 != (CBaseEntity *)0x0) {
pCVar21 = (CBaseCombatCharacter *)(**(code **)(*(int *)local_ae8 + 0x144))(local_ae8);
}
uVar11 = *(uint *)(this + 0x14c);
if ((uVar11 & 0x1000) != 0) {
CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
uVar11 = *(uint *)(this + 0x14c);
}
if ((uVar11 & 0x800) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
pVVar12 = (Vector *)(**(code **)(*(int *)this + 0x288))(this);
piVar9 = (int *)CPipeBombProjectile::Create
(pVVar12,(QAngle *)(this + 0x37c),(Vector *)(this + 0x274),
(Vector *)&vec3_origin,pCVar21,0.1);
if (piVar9 != (int *)0x0) {
(**(code **)(*piVar9 + 0x56c))(piVar9);
}
CBaseEntity::EmitSound((CBaseEntity *)this,"PropaneTank.Burst",0.0,(float *)0x0);
if (param_1 == (CBaseEntity *)0x0) {
local_220 = 0;
puVar22 = local_21c;
for (iVar8 = 0x3f; iVar8 != 0; iVar8 = iVar8 + -1) {
*puVar22 = 0;
puVar22 = puVar22 + (uint)bVar23 * -2 + 1;
}
}
else {
cVar7 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if (cVar7 != '\0') {
AI_CriteriaSet::AI_CriteriaSet((AI_CriteriaSet *)local_a28);
/* try { // try from 007eccbe to 007ecd57 has its CatchHandler @ 007ee465 */
pcVar13 = (char *)SurvivorCharacterName(*(undefined4 *)(param_1 + 0x2ba0));
AI_CriteriaSet::AppendCriteria((AI_CriteriaSet *)local_a28,"Subject",pcVar13,1.0);
AI_CriteriaSet::AppendCriteria((AI_CriteriaSet *)local_a28,"ExplosionType","Default",1.0);
local_a7c = (undefined4 *)0x1;
local_a78 = (undefined4 *)0xffffffff;
CAI_Concept::CAI_Concept((CAI_Concept *)&local_a8c,"PropExplosion");
CResponseQueue::Add((CResponseQueue *)g_ResponseQueueManager._12_4_,
(CAI_Concept *)&local_a8c,(AI_CriteriaSet *)local_a28,0.0,
(CFollowupTargetSpec_t *)&local_a7c,(CBaseEntity *)0x0);
AI_CriteriaSet::~AI_CriteriaSet((AI_CriteriaSet *)local_a28);
}
puVar22 = local_21c;
for (iVar8 = 0x3f; iVar8 != 0; iVar8 = iVar8 + -1) {
*puVar22 = 0;
puVar22 = puVar22 + (uint)bVar23 * -2 + 1;
}
local_220 = 0;
piVar9 = (int *)TheLog();
(**(code **)(*piVar9 + 0x14))(piVar9,param_1,&local_220,0x100);
}
puVar22 = local_11c;
for (iVar8 = 0x3f; iVar8 != 0; iVar8 = iVar8 + -1) {
*puVar22 = 0;
puVar22 = puVar22 + (uint)bVar23 * -2 + 1;
}
local_120 = 0;
if (local_ae8 != (CBaseEntity *)0x0) {
piVar9 = (int *)TheLog();
(**(code **)(*piVar9 + 0x14))(piVar9,local_ae8,&local_120,0x100);
}
iVar8 = (**(code **)(*(int *)this + 0x288))(this);
fVar25 = *(float *)(iVar8 + 8);
iVar8 = (**(code **)(*(int *)this + 0x288))(this);
fVar24 = *(float *)(iVar8 + 4);
pfVar14 = (float *)(**(code **)(*(int *)this + 0x288))(this);
UTIL_LogPrintf("Explosion prop detonated %.0f,%.0f,%.0f. Breaker:%s. Attacker:%s.\n",
(double)*pfVar14,(double)fVar24,(double)fVar25,&local_220,&local_120);
bVar6 = true;
}
else {
bVar6 = false;
}
}
(**(code **)(*(int *)this + 0x45c))(this,&local_ad4,&local_ac8,param_1);
local_a7c = &local_abc;
local_a78 = &local_ab0;
local_a6c = *(float *)(this + 0x1444);
local_a64 = (float)4;
if (*(int *)(this + 0x234) != 0) {
local_a64 = (float)*(int *)(this + 0x234);
}
local_a68 = 100.0;
local_a74 = &local_ad4;
local_a70 = &local_ac8;
if ((*(int *)(gpGlobals + 0x14) < 2) || (*(int *)(breakable_multiplayer._28_4_ + 0x30) == 0)) {
iVar8 = *(int *)(this + 0x1468);
if ((iVar8 != 1) || (*(int *)(breakable_disable_gib_limit._28_4_ + 0x30) != 0)) {
iVar16 = (**(code **)(*(int *)this + 0x1c))(this);
PropBreakableCreateAll
(iVar16,pIVar10,(breakablepropparams_t *)&local_a7c,(CBaseEntity *)this,-1,
iVar8 == 2,true);
}
goto LAB_007ed0fb;
}
pVVar12 = (Vector *)(**(code **)(*(int *)this + 0x288))(this);
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_a28);
local_a28[0] = &PTR__CPASFilter_00bfaf28;
/* try { // try from 007ecf3b to 007ecf3f has its CatchHandler @ 007ee4af */
CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_a28,pVVar12);
local_aa4 = 0.0;
local_aa0 = 0.0;
local_a9c = 0.0;
if (pIVar10 != (IPhysicsObject *)0x0) {
/* try { // try from 007ecf85 to 007ed0e8 has its CatchHandler @ 007ee493 */
(**(code **)(*(int *)pIVar10 + 0xd4))(pIVar10,&local_aa4);
}
iVar8 = (**(code **)(*(int *)this + 0x448))(this);
if (iVar8 == 1) {
LAB_007ed096:
iVar8 = *(int *)(this + 0x1468);
if ((iVar8 != 1) || (*(int *)(breakable_disable_gib_limit._28_4_ + 0x30) != 0)) {
iVar16 = (**(code **)(*(int *)this + 0x1c))(this);
PropBreakableCreateAll
(iVar16,pIVar10,(breakablepropparams_t *)&local_a7c,(CBaseEntity *)this,-1,
iVar8 == 2,false);
}
}
else if (iVar8 < 2) {
if (iVar8 == 0) goto LAB_007ee200;
}
else if (iVar8 == 2) {
LAB_007ee200:
GetVelocityFromDamageForce((CTakeDamageInfo *)&local_a98,(CBaseEntity *)param_2);
local_a8c = local_a98 + local_aa4;
pcVar19 = *(code **)(*(int *)te + 0xa0);
local_a88 = local_a94 + local_aa0;
CVar1 = this[0x126];
CVar2 = this[0x125];
local_a84 = local_a90 + local_a9c;
CVar3 = this[0x124];
uVar4 = *(undefined4 *)(this + 0xd4);
/* try { // try from 007ee41c to 007ee457 has its CatchHandler @ 007ee493 */
if ((((byte)this[0x14d] & 8) != 0) &&
(CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
uVar5 = *(undefined4 *)(this + 0x458);
/* try { // try from 007ee2d1 to 007ee345 has its CatchHandler @ 007ee493 */
uVar15 = (**(code **)(*(int *)this + 0x1c))(this);
(*pcVar19)(te,(CRecipientFilter *)local_a28,0xbf800000,uVar15,uVar5,this + 0x2e0,this + 0x37c,
&local_a8c,1,uVar4,CVar3,CVar2,CVar1);
}
else if (iVar8 == 3) {
pcVar19 = *(code **)(*(int *)te + 0xa0);
CVar1 = this[0x126];
CVar2 = this[0x125];
CVar3 = this[0x124];
uVar4 = *(undefined4 *)(this + 0xd4);
if ((((byte)this[0x14d] & 8) != 0) &&
(CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
uVar5 = *(undefined4 *)(this + 0x458);
uVar15 = (**(code **)(*(int *)this + 0x1c))(this);
(*pcVar19)(te,(CRecipientFilter *)local_a28,0xbf800000,uVar15,uVar5,this + 0x2e0,this + 0x37c,
&local_aa4,1,uVar4,CVar3,CVar2,CVar1);
goto LAB_007ed096;
}
local_a28[0] = &PTR__CPASFilter_00bfaf28;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_a28);
LAB_007ed0fb:
cVar7 = (**(code **)(*(int *)this + 0x440))(this,6);
if (cVar7 != '\0') {
if (!bVar6) {
ExplosionCreate(&local_abc,&local_ab0,local_ae8,1,(int)*(float *)(this + 0x149c),0x429,0,this,
0xffffffff,0,0);
}
if (0.0 < *(float *)(this + 0x149c)) {
CEntitySphereQuery::CEntitySphereQuery
((CEntitySphereQuery *)local_a28,(Vector *)&local_abc,*(float *)(this + 0x149c),0);
while (piVar9 = (int *)CEntitySphereQuery::GetCurrentEntity((CEntitySphereQuery *)local_a28),
piVar9 != (int *)0x0) {
iVar8 = (**(code **)(*piVar9 + 0x144))(piVar9);
if ((iVar8 != 0) && (cVar7 = (**(code **)(*piVar9 + 0x118))(piVar9,param_2), cVar7 != '\0'))
{
piVar9 = (int *)(**(code **)(*piVar9 + 0x144))(piVar9);
(**(code **)(*piVar9 + 0x380))(piVar9,0x41f00000,1,0);
}
local_a28[0] = (undefined **)((int)local_a28[0] + 1);
}
}
}
cVar7 = (**(code **)(*(int *)this + 0x440))(this,7);
if ((cVar7 != '\0') && (!bVar6)) {
ExplosionCreate(&local_abc,&local_ab0,local_ae8,1,(int)*(float *)(this + 0x149c),0x8428,0,this,
0xffffffff,0,0);
}
UTIL_Remove((CBaseEntity *)this);
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.