CEnvExplosion::Spawn
0x00699990 · 205 bytes · __thiscall
_ZN13CEnvExplosion5SpawnEv
Decompiled
undefined (1 param)
/* CEnvExplosion::Spawn() */
void __thiscall CEnvExplosion::Spawn(CEnvExplosion *this)
{
uint uVar1;
float fVar2;
float fVar3;
(**(code **)(*(int *)this + 0x6c))(this);
CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),0);
CBaseEntity::AddEffects((CBaseEntity *)this,0x20);
CBaseEntity::SetMoveType((CBaseEntity *)this,0,0);
uVar1 = *(uint *)(this + 0x148);
fVar2 = (float)(*(int *)(this + 0x440) + -0x32) * 0.6;
if ((uVar1 & 0x800) == 0) {
fVar3 = 10.0;
if (10.0 <= fVar2) goto LAB_00699a15;
LAB_00699a4d:
fVar2 = fVar3;
if ((uVar1 & 0x1000) == 0) goto LAB_00699a22;
}
else {
fVar3 = 1.0;
if (fVar2 < 1.0) goto LAB_00699a4d;
LAB_00699a15:
fVar3 = fVar2;
if ((uVar1 & 0x1000) == 0) {
if (50.0 <= fVar2) {
fVar2 = 50.0;
}
goto LAB_00699a22;
}
}
fVar2 = fVar3;
if (200.0 <= fVar3) {
fVar2 = 200.0;
}
LAB_00699a22:
*(undefined4 *)(this + 0x45c) = 0xffffffff;
*(int *)(this + 0x448) = (int)fVar2;
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.