CPhysicsCannister::Explode
0x00788030 · 399 bytes · __thiscall
_ZN17CPhysicsCannister7ExplodeEP11CBaseEntity
Decompiled
undefined (2 params)
/* CPhysicsCannister::Explode(CBaseEntity*) */
void __thiscall CPhysicsCannister::Explode(CPhysicsCannister *this,CBaseEntity *param_1)
{
float fVar1;
IPhysicsObject *pIVar2;
int iVar3;
Vector local_34 [12];
Vector local_28 [24];
if (this[0x105] != (CPhysicsCannister)0x0) {
(**(code **)(*(int *)this + 0x224))(this,this + 0x105);
this[0x105] = (CPhysicsCannister)0x0;
}
Deactivate(this);
pIVar2 = *(IPhysicsObject **)(this + 0x238);
(**(code **)(*(int *)pIVar2 + 0xd4))(pIVar2,local_34,local_28);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
}
iVar3 = (**(code **)(*(int *)this + 0x1c))(this);
PropBreakableCreateAll
(iVar3,pIVar2,(Vector *)(this + 0x2e0),(QAngle *)(this + 0x37c),local_34,local_28,1.0,
20.0,1,(CBaseEntity *)0x0,true);
fVar1 = *(float *)(this + 0x1a7c);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
}
ExplosionCreate((Vector *)(this + 0x2e0),(QAngle *)(this + 0x37c),param_1,(int)fVar1,0,true,0.0,
false,false,-1);
UTIL_Remove((CBaseEntity *)this);
return;
}
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.