CBaseCombatWeapon::MakeTracer
0x00406050 · 330 bytes · __thiscall
_ZN17CBaseCombatWeapon10MakeTracerERK6VectorRK10CGameTracei
Decompiled
undefined (4 params)
/* CBaseCombatWeapon::MakeTracer(Vector const&, CGameTrace const&, int) */
void __thiscall
CBaseCombatWeapon::MakeTracer
(CBaseCombatWeapon *this,Vector *param_1,CGameTrace *param_2,int param_3)
{
char cVar1;
int iVar2;
char *pcVar3;
int iVar4;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
iVar2 = GetOwner(this);
if (iVar2 == 0) {
CBaseEntity::MakeTracer((CBaseEntity *)this,param_1,param_2,param_3);
return;
}
pcVar3 = (char *)(**(code **)(*(int *)this + 0x60))(this);
local_28 = *(undefined4 *)param_1;
local_24 = *(undefined4 *)(param_1 + 4);
local_20 = *(undefined4 *)(param_1 + 8);
if (*(int *)(iVar2 + 0x30) == 0) {
iVar2 = 0;
}
else {
iVar2 = *(int *)(iVar2 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
cVar1 = (**(code **)(*g_pGameRules + 0x88))(g_pGameRules);
if (cVar1 != '\0') {
if (*(int *)(this + 0x30) == 0) {
iVar2 = 0;
}
else {
iVar2 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
}
iVar4 = (**(code **)(*(int *)this + 0x3f8))(this);
if (*(int *)(ZombieTracerParticles._28_4_ + 0x30) == 0) {
if ((param_3 == 1) || (param_3 == 4)) {
UTIL_Tracer((Vector *)&local_28,(Vector *)(param_2 + 0xc),iVar2,iVar4,0.0,true,pcVar3,0);
}
return;
}
UTIL_ParticleTracer("weapon_tracers",(Vector *)&local_28,(Vector *)(param_2 + 0xc),iVar2,iVar4,
true);
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.