PhysicsCheckSweep
0x0078bbd0 · 196 bytes · __regparm3
_ZL17PhysicsCheckSweepP11CBaseEntityRK6VectorS3_P10CGameTrace
Decompiled
undefined (4 params)
/* PhysicsCheckSweep(CBaseEntity*, Vector const&, Vector const&, CGameTrace*) */
void __regparm3
PhysicsCheckSweep(CBaseEntity *param_1,Vector *param_2,Vector *param_3,CGameTrace *param_4)
{
uint uVar1;
uint uVar2;
undefined *puVar3;
float local_28;
float local_24;
float local_20;
uVar2 = (**(code **)(*(int *)param_1 + 0x2c8))(param_1);
local_28 = *(float *)param_3 + *(float *)param_2;
local_24 = *(float *)(param_3 + 4) + *(float *)(param_2 + 4);
local_20 = *(float *)(param_3 + 8) + *(float *)(param_2 + 8);
if ((param_1[0x1b6] == (CBaseEntity)0x0) || ((*(ushort *)(param_1 + 0x1b4) & 0x24) != 0)) {
uVar1 = *(uint *)(param_1 + 0x188);
if ((uVar1 != 0xffffffff) &&
(((puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc &&
(*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar3 + 4) != 0)))) {
UTIL_ClearTrace(param_4);
return;
}
uVar2 = uVar2 & 0xfdffffff;
}
Physics_TraceEntity(param_1,param_2,(Vector *)&local_28,uVar2,param_4);
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.