CEntityDissolve::ElectrocuteThink
0x00677b20 · 400 bytes · __thiscall
_ZN15CEntityDissolve16ElectrocuteThinkEv
Decompiled
undefined (1 param)
/* CEntityDissolve::ElectrocuteThink() */
void __thiscall CEntityDissolve::ElectrocuteThink(CEntityDissolve *this)
{
uint uVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
undefined *puVar6;
undefined4 *puVar7;
int iVar8;
undefined1 local_34 [12];
float local_28;
float local_24;
float local_20;
uVar1 = *(uint *)(this + 0x188);
if ((((uVar1 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)) {
iVar2 = __dynamic_cast(*(int *)(puVar6 + 4),&CBaseEntity::typeinfo,&CRagdollProp::typeinfo,0);
if (iVar2 != 0) {
if (0 < *(int *)(iVar2 + 0x13f8)) {
iVar8 = 0;
puVar7 = (undefined4 *)(iVar2 + 0x1410);
do {
iVar3 = rand();
iVar8 = iVar8 + 1;
iVar4 = rand();
iVar5 = rand();
local_28 = (float)iVar3 * 0.14648885 - 2400.0;
local_24 = (float)iVar4 * 0.14648885 - 2400.0;
local_20 = (float)iVar5 * 0.14648885 - 2400.0;
(**(code **)(*(int *)*puVar7 + 0xf4))((int *)*puVar7,&local_28);
puVar7 = puVar7 + 0x15;
} while (iVar8 < *(int *)(iVar2 + 0x13f8));
}
(**(code **)(*random_valve + 4))(random_valve,0x3dcccccd,0x3e4ccccd);
CBaseEntity::ThinkSet((_func_void *)local_34,(float)this,(char *)ElectrocuteThink);
return;
}
}
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.