CBaseEntity::StepSimulationThink
0x0078fe40 · 700 bytes · __thiscall
_ZN11CBaseEntity19StepSimulationThinkEf
Decompiled
undefined (2 params)
/* CBaseEntity::StepSimulationThink(float) */
void __thiscall CBaseEntity::StepSimulationThink(CBaseEntity *this,float param_1)
{
char cVar1;
undefined1 *puVar2;
int iVar3;
CBaseAnimating *this_00;
undefined4 uVar4;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
CheckStepSimulationChanged(this);
puVar2 = (undefined1 *)GetDataObject(this,2);
if (puVar2 != (undefined1 *)0x0) {
*puVar2 = 1;
puVar2[1] = 1;
*(undefined4 *)(puVar2 + 0x90) = 0xffffffff;
*(undefined4 *)(puVar2 + 0x94) = 0;
*(undefined4 *)(puVar2 + 0x98) = 0;
*(undefined4 *)(puVar2 + 0x9c) = 0;
*(undefined4 *)(puVar2 + 0xa0) = 0;
*(undefined4 *)(puVar2 + 0xa4) = 0;
*(undefined4 *)(puVar2 + 0xa8) = 0;
*(undefined4 *)(puVar2 + 8) = *(undefined4 *)(puVar2 + 0x28);
*(undefined4 *)(puVar2 + 4) = *(undefined4 *)(puVar2 + 0x24);
*(undefined4 *)(puVar2 + 0xc) = *(undefined4 *)(puVar2 + 0x2c);
*(undefined4 *)(puVar2 + 0x10) = *(undefined4 *)(puVar2 + 0x30);
*(undefined4 *)(puVar2 + 0x14) = *(undefined4 *)(puVar2 + 0x34);
*(undefined4 *)(puVar2 + 0x18) = *(undefined4 *)(puVar2 + 0x38);
*(undefined4 *)(puVar2 + 0x1c) = *(undefined4 *)(puVar2 + 0x3c);
*(undefined4 *)(puVar2 + 0x20) = *(undefined4 *)(puVar2 + 0x40);
*(undefined4 *)(puVar2 + 0x24) = *(undefined4 *)(gpGlobals + 0x18);
(**(code **)(*(int *)this + 0x2d4))(&local_28,this);
*(undefined4 *)(puVar2 + 0x28) = local_28;
*(undefined4 *)(puVar2 + 0x2c) = local_24;
*(undefined4 *)(puVar2 + 0x30) = local_20;
(**(code **)(*(int *)this + 0x2d8))(&local_34,this);
AngleQuaternion((QAngle *)&local_34,(Quaternion *)(puVar2 + 0x34));
PhysicsStepRunTimestep(this,param_1);
PhysicsRunThink(this,1);
iVar3 = (**(code **)(*(int *)this + 0xf0))(this);
if (iVar3 != 0) {
this_00 = (CBaseAnimating *)(**(code **)(*(int *)this + 0xf0))(this);
CBaseAnimating::UpdateStepOrigin(this_00);
}
(**(code **)(*(int *)this + 0x2d4))(&local_28,this);
*(undefined4 *)(puVar2 + 0x68) = local_28;
*(undefined4 *)(puVar2 + 0x6c) = local_24;
*(undefined4 *)(puVar2 + 0x70) = local_20;
(**(code **)(*(int *)this + 0x2d8))(&local_28,this);
local_34 = local_28;
local_30 = local_24;
local_2c = local_20;
AngleQuaternion((QAngle *)&local_34,(Quaternion *)(puVar2 + 0x74));
(**(code **)(*(int *)this + 0x2d8))(&local_28,this);
*(undefined4 *)(puVar2 + 0x84) = local_28;
*(undefined4 *)(puVar2 + 0x88) = local_24;
*(undefined4 *)(puVar2 + 0x8c) = local_20;
uVar4 = GetNextThinkTick(this,(char *)0x0);
*(undefined4 *)(puVar2 + 100) = uVar4;
cVar1 = IsSimulatingOnAlternateTicks();
if (cVar1 != '\0') {
*(int *)(puVar2 + 100) = *(int *)(puVar2 + 100) + 1;
}
if ((0.0 < param_1) &&
(16777216.0 <=
((*(float *)(puVar2 + 0x6c) - *(float *)(puVar2 + 0x2c)) *
(*(float *)(puVar2 + 0x6c) - *(float *)(puVar2 + 0x2c)) +
(*(float *)(puVar2 + 0x70) - *(float *)(puVar2 + 0x30)) *
(*(float *)(puVar2 + 0x70) - *(float *)(puVar2 + 0x30)) +
(*(float *)(puVar2 + 0x68) - *(float *)(puVar2 + 0x28)) *
(*(float *)(puVar2 + 0x68) - *(float *)(puVar2 + 0x28))) / (param_1 * param_1))) {
*puVar2 = 0;
puVar2[1] = 0;
}
return;
}
PhysicsStepRunTimestep(this,param_1);
PhysicsRunThink(this,1);
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.