CBaseEntity::MakeTracer
0x0040f090 · 202 bytes · __thiscall
_ZN11CBaseEntity10MakeTracerERK6VectorRK10CGameTracei
Decompiled
undefined (4 params)
/* CBaseEntity::MakeTracer(Vector const&, CGameTrace const&, int) */
void __thiscall
CBaseEntity::MakeTracer(CBaseEntity *this,Vector *param_1,CGameTrace *param_2,int param_3)
{
char *pcVar1;
int iVar2;
int iVar3;
bool bVar4;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
pcVar1 = (char *)(**(code **)(*(int *)this + 0x60))(this);
local_28 = *(undefined4 *)param_1;
local_24 = *(undefined4 *)(param_1 + 4);
local_20 = *(undefined4 *)(param_1 + 8);
iVar2 = (**(code **)(*(int *)this + 0x1e8))(this);
if (param_3 == 1) {
if (*(int *)(this + 0x30) == 0) {
iVar3 = 0;
}
else {
iVar3 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
bVar4 = false;
}
else {
if (param_3 != 4) {
return;
}
if (*(int *)(this + 0x30) == 0) {
iVar3 = 0;
}
else {
iVar3 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
bVar4 = true;
}
UTIL_Tracer((Vector *)&local_28,(Vector *)(param_2 + 0xc),iVar3,iVar2,0.0,bVar4,pcVar1,0);
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.