CRagdollBoogie::BoogieThink
0x008040b0 · 677 bytes · __thiscall
_ZN14CRagdollBoogie11BoogieThinkEv
Decompiled
undefined (1 param)
/* CRagdollBoogie::BoogieThink() */
void __thiscall CRagdollBoogie::BoogieThink(CRagdollBoogie *this)
{
uint uVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
undefined *puVar6;
int iVar7;
undefined4 *puVar8;
longdouble lVar9;
float fVar10;
float fVar11;
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)
, iVar2 == 0)))) {
UTIL_Remove((CBaseEntity *)this);
return;
}
if (*(float *)(this + 0x444) != 0.0) {
fVar10 = *(float *)(gpGlobals + 0xc);
fVar11 = fVar10 - *(float *)(this + 0x440);
if (*(float *)(this + 0x444) <= fVar11) {
if (*(int *)(this + 0x44c) == 0) {
UTIL_Remove((CBaseEntity *)this);
}
CBaseEntity::ThinkSet((_func_void *)local_34,(float)this,(char *)0x0);
return;
}
if (fVar11 < 0.0) {
lVar9 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0x3dcccccd,0x3e4ccccd);
CBaseEntity::SetNextThink((CBaseEntity *)this,(float)lVar9 + fVar10,(char *)0x0);
return;
}
}
if ((*(int *)(this + 0x44c) == 0) && (0 < *(int *)(iVar2 + 0x13f8))) {
iVar7 = 0;
puVar8 = (undefined4 *)(iVar2 + 0x1410);
do {
iVar7 = iVar7 + 1;
lVar9 = (longdouble)(**(code **)(*(int *)*puVar8 + 0x78))((int *)*puVar8);
fVar10 = (float)lVar9 * *(float *)(this + 0x448);
iVar3 = rand();
fVar11 = fVar10 + fVar10;
iVar4 = rand();
iVar5 = rand();
local_20 = (float)iVar5 * 3.051851e-05 * fVar11 - fVar10;
local_28 = (float)iVar3 * 3.051851e-05 * fVar11 - fVar10;
local_24 = (float)iVar4 * 3.051851e-05 * fVar11 - fVar10;
(**(code **)(*(int *)*puVar8 + 0xf4))((int *)*puVar8,&local_28);
puVar8 = puVar8 + 0x15;
} while (iVar7 < *(int *)(iVar2 + 0x13f8));
}
fVar10 = *(float *)(gpGlobals + 0xc);
lVar9 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0x3dcccccd,0x3e4ccccd);
CBaseEntity::SetNextThink((CBaseEntity *)this,(float)lVar9 + fVar10,(char *)0x0);
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.