CBaseEntity::TraceBleed
0x0040f1a0 · 807 bytes · __thiscall
_ZN11CBaseEntity10TraceBleedEfRK6VectorP10CGameTracei
Decompiled
undefined (5 params)
/* CBaseEntity::TraceBleed(float, Vector const&, CGameTrace*, int) */
void __thiscall
CBaseEntity::TraceBleed
(CBaseEntity *this,float param_1,Vector *param_2,CGameTrace *param_3,int param_4)
{
float fVar1;
float fVar2;
float fVar3;
char cVar4;
int iVar5;
longdouble lVar6;
longdouble lVar7;
longdouble lVar8;
float fVar9;
CTraceFilterSimple local_dc [16];
undefined4 local_cc;
undefined4 local_c8;
undefined4 local_c4;
float local_bc;
float local_b8;
float local_b4;
undefined4 local_ac;
undefined4 local_a8;
undefined4 local_a4;
undefined4 local_9c;
undefined4 local_98;
undefined4 local_94;
undefined4 local_8c;
undefined1 local_88;
undefined1 local_87;
Vector local_70 [12];
Vector local_64 [32];
float local_44;
iVar5 = (**(code **)(*(int *)this + 0x138))(this);
if ((((iVar5 != -1) && (iVar5 = (**(code **)(*(int *)this + 0x138))(this), iVar5 != 3)) &&
(param_1 != 0.0)) && ((param_4 & 0x20000c7U) != 0)) {
cVar4 = (**(code **)(*(int *)this + 300))(this);
if (cVar4 == '\0') {
iVar5 = (**(code **)(*(int *)this + 0x1fc))(this);
if (iVar5 < 1) {
return;
}
iVar5 = *(int *)(this + 0xfc);
(**(code **)(*(int *)this + 0x20c))(this,this + 0xfc);
*(int *)(this + 0xfc) = iVar5 + -1;
}
fVar9 = -172.0;
if ((param_4 & 0x2000000U) != 0) {
fVar9 = -384.0;
}
fVar1 = *(float *)param_2;
fVar2 = *(float *)(param_2 + 4);
fVar3 = *(float *)(param_2 + 8);
lVar6 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0xbdcccccd,0x3dcccccd);
lVar7 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0xbdcccccd,0x3dcccccd);
lVar8 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0xbdcccccd,0x3dcccccd);
local_88 = 1;
local_bc = ((float)lVar6 - fVar1) * fVar9;
local_94 = 0;
local_98 = 0;
local_b8 = ((float)lVar7 - fVar2) * fVar9;
local_9c = 0;
local_8c = 0;
local_b4 = ((float)lVar8 - fVar3) * fVar9;
local_cc = *(undefined4 *)(param_3 + 0xc);
local_a4 = 0;
local_c8 = *(undefined4 *)(param_3 + 0x10);
local_c4 = *(undefined4 *)(param_3 + 0x14);
local_a8 = 0;
local_ac = 0;
local_87 = local_b8 * local_b8 + local_bc * local_bc + local_b4 * local_b4 != 0.0;
CTraceFilterSimple::CTraceFilterSimple
(local_dc,(IHandleEntity *)this,0,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_cc,0x4003,local_dc,local_70);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_70,local_64,0xff,0,0,true,-1.0);
}
if (local_44 != 1.0) {
iVar5 = (**(code **)(*(int *)this + 0x138))(this);
UTIL_BloodDecalTrace((CGameTrace *)local_70,iVar5);
}
}
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.