CPhysicsShake::Simulate
0x0068a940 · 168 bytes · __thiscall
_ZN13CPhysicsShake8SimulateEP24IPhysicsMotionControllerP14IPhysicsObjectfR6VectorS5_
Decompiled
undefined (6 params)
/* CPhysicsShake::Simulate(IPhysicsMotionController*, IPhysicsObject*, float, Vector&, Vector&) */
undefined4 __thiscall
CPhysicsShake::Simulate
(CPhysicsShake *this,IPhysicsMotionController *param_1,IPhysicsObject *param_2,
float param_3,Vector *param_4,Vector *param_5)
{
code *pcVar1;
char cVar2;
undefined4 uVar3;
longdouble lVar4;
undefined1 local_34 [12];
float local_28;
float local_24;
float local_20;
cVar2 = (**(code **)(*(int *)param_2 + 0x110))(param_2,local_34,0);
uVar3 = 0;
if (cVar2 != '\0') {
pcVar1 = *(code **)(*(int *)param_2 + 0x100);
lVar4 = (longdouble)(**(code **)(*(int *)param_2 + 0x78))(param_2);
local_20 = (float)lVar4 * 0.4 + 1.0;
local_28 = *(float *)(this + 4) * local_20;
local_24 = *(float *)(this + 8) * local_20;
local_20 = local_20 * *(float *)(this + 0xc);
(*pcVar1)(param_2,&local_28,local_34,param_4,param_5);
uVar3 = 2;
}
return uVar3;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.