UTIL_PredictedPosition
0x00b2e5a0 · 378 bytes · __cdecl
_Z22UTIL_PredictedPositionP11CBaseEntityfP6Vector
Decompiled
undefined (3 params)
/* UTIL_PredictedPosition(CBaseEntity*, float, Vector*) */
void UTIL_PredictedPosition(CBaseEntity *param_1,float param_2,Vector *param_3)
{
float fVar1;
float fVar2;
char cVar3;
CBaseEntity *pCVar4;
int *piVar5;
int iVar6;
float local_28;
float local_24;
float local_20;
if ((param_1 == (CBaseEntity *)0x0) || (param_3 == (Vector *)0x0)) {
return;
}
cVar3 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if (cVar3 == '\0') {
pCVar4 = (CBaseEntity *)(**(code **)(*(int *)param_1 + 0x144))(param_1);
if (pCVar4 != (CBaseEntity *)0x0) {
cVar3 = (**(code **)(*(int *)pCVar4 + 0x4fc))(pCVar4);
if (cVar3 != '\0') {
iVar6 = *(int *)pCVar4;
goto LAB_00b2e6ed;
}
}
piVar5 = (int *)__dynamic_cast(param_1,&CBaseEntity::typeinfo,&CBaseAnimating::typeinfo,0);
if (piVar5 != (int *)0x0) {
(**(code **)(*piVar5 + 0x378))(&local_28,piVar5);
goto LAB_00b2e677;
}
}
else {
cVar3 = (**(code **)(*(int *)param_1 + 0x4fc))(param_1);
if (cVar3 != '\0') {
iVar6 = *(int *)param_1;
pCVar4 = param_1;
LAB_00b2e6ed:
piVar5 = (int *)(**(code **)(iVar6 + 0x504))(pCVar4);
(**(code **)(*piVar5 + 600))(&local_28,piVar5);
goto LAB_00b2e677;
}
}
(**(code **)(*(int *)param_1 + 600))(&local_28,param_1);
LAB_00b2e677:
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(param_1);
}
fVar1 = *(float *)(param_1 + 0x2e8);
fVar2 = *(float *)(param_1 + 0x2e0);
*(float *)(param_3 + 4) = local_24 * param_2 + *(float *)(param_1 + 0x2e4);
*(float *)(param_3 + 8) = local_20 * param_2 + fVar1;
*(float *)param_3 = local_28 * param_2 + fVar2;
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.