cc_CreatePredictionError_f
0x00651bb0 · 225 bytes · __cdecl
_Z26cc_CreatePredictionError_fRK8CCommand
Decompiled
undefined (1 param)
/* cc_CreatePredictionError_f(CCommand const&) */
void cc_CreatePredictionError_f(CCommand *param_1)
{
byte *pbVar1;
int *piVar2;
CBaseEntity *this;
byte *pbVar3;
float fVar4;
double dVar5;
float local_18;
undefined4 local_14;
undefined4 local_10;
fVar4 = 32.0;
if (1 < *(int *)param_1) {
dVar5 = strtod(*(char **)(param_1 + 0x40c),(char **)0x0);
fVar4 = (float)dVar5;
}
pbVar1 = *(byte **)(gpGlobals + 0x58);
if (((pbVar1 == (byte *)0x0) ||
((((pbVar1[0x10] & 2) != 0 || (pbVar3 = pbVar1 + 0x10, pbVar1 + 0x10 == (byte *)0x0)) &&
(pbVar3 = pbVar1, (*pbVar1 & 2) != 0)))) ||
(piVar2 = *(int **)(pbVar3 + 0xc), piVar2 == (int *)0x0)) {
this = (CBaseEntity *)0x0;
}
else {
this = (CBaseEntity *)(**(code **)(*piVar2 + 0x18))(piVar2);
}
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this);
}
local_18 = fVar4 + *(float *)(this + 0x2e0);
local_14 = *(undefined4 *)(this + 0x2e4);
local_10 = *(undefined4 *)(this + 0x2e8);
CBaseEntity::SetAbsOrigin(this,(Vector *)&local_18);
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.