CSheetSimulator::SetPosition
0x004afb50 · 238 bytes · __thiscall
_ZN15CSheetSimulator11SetPositionERK6VectorRK6QAngle
Decompiled
undefined (3 params)
/* CSheetSimulator::SetPosition(Vector const&, QAngle const&) */
void __thiscall CSheetSimulator::SetPosition(CSheetSimulator *this,Vector *param_1,QAngle *param_2)
{
int iVar1;
int iVar2;
int iVar3;
float fVar4;
fVar4 = *(float *)param_1;
if ((1000.0 < (*(float *)(this + 0x60) - fVar4) * (*(float *)(this + 0x60) - fVar4) +
(*(float *)(this + 0x68) - *(float *)(param_1 + 8)) *
(*(float *)(this + 0x68) - *(float *)(param_1 + 8)) +
(*(float *)(this + 100) - *(float *)(param_1 + 4)) *
(*(float *)(this + 100) - *(float *)(param_1 + 4))) &&
(0 < *(int *)this * *(int *)(this + 4))) {
iVar2 = 0;
iVar3 = 0;
do {
iVar3 = iVar3 + 1;
iVar1 = *(int *)(this + 8) + iVar2;
*(float *)(iVar1 + 4) = fVar4;
*(undefined4 *)(iVar1 + 8) = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(iVar1 + 0xc) = *(undefined4 *)(param_1 + 8);
iVar1 = *(int *)(this + 8) + iVar2;
iVar2 = iVar2 + 0x34;
*(undefined4 *)(iVar1 + 0x10) = 0;
*(undefined4 *)(iVar1 + 0x14) = 0;
*(undefined4 *)(iVar1 + 0x18) = 0;
fVar4 = *(float *)param_1;
} while (iVar3 < *(int *)this * *(int *)(this + 4));
}
*(float *)(this + 0x60) = fVar4;
*(undefined4 *)(this + 100) = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(this + 0x68) = *(undefined4 *)(param_1 + 8);
*(undefined4 *)(this + 0x6c) = *(undefined4 *)param_2;
*(undefined4 *)(this + 0x70) = *(undefined4 *)(param_2 + 4);
*(undefined4 *)(this + 0x74) = *(undefined4 *)(param_2 + 8);
ComputeControlPoints(this);
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.