CEngineTrace::SetupLeafAndEntityListBox
0x001597b0 · 618 bytes · __thiscall
_ZN12CEngineTrace25SetupLeafAndEntityListBoxERK6VectorS2_P14ITraceListData
Decompiled
undefined (4 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CEngineTrace::SetupLeafAndEntityListBox(Vector const&, Vector const&, ITraceListData*) */
void __thiscall
CEngineTrace::SetupLeafAndEntityListBox
(CEngineTrace *this,Vector *param_1,Vector *param_2,ITraceListData *param_3)
{
Vector *pVVar1;
Vector *pVVar2;
code *pcVar3;
char cVar4;
int iVar5;
int *piVar6;
undefined4 uVar7;
int iVar8;
CTraceListData *pCVar9;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (_exit == 0) {
local_20 = 0;
}
else {
(**(code **)(_exit + 0x50))
(_exit,&local_34,0,0,0,0,"/data/src/engine/./enginetrace.cpp",0x65b,
&SetupLeafAndEntityListBox(Vector_const&,Vector_const&,ITraceListData*)::tm_fmt,
"(%s)%s","Unaccounted","SetupLeafAndEntityListBox");
local_20 = _exit;
}
iVar5 = _DAT_0040b9d4;
local_28 = local_34;
local_24 = local_30;
if ((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) {
/* try { // try from 00159976 to 001599c4 has its CatchHandler @ 00159a4c */
iVar8 = ThreadGetCurrentId();
if (iVar5 == iVar8) {
if ((char *)*_DAT_0040b030 != "SetupLeafAndEntityListBox") {
_DAT_0040b030 =
(int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2aeaad,&DAT_00000001,0x2a054b);
}
CVProfNode::EnterScope();
DAT_0040b02c = '\0';
}
}
pCVar9 = (CTraceListData *)0x0;
if (param_3 != (ITraceListData *)0x0) {
pCVar9 = (CTraceListData *)(param_3 + -4);
}
/* try { // try from 00159876 to 00159916 has its CatchHandler @ 00159a2b */
(**(code **)(*(int *)pCVar9 + 0xc))(pCVar9);
pVVar1 = (Vector *)(pCVar9 + 0x528);
*(CEngineTrace **)(pCVar9 + 0x540) = this;
pVVar2 = (Vector *)(pCVar9 + 0x534);
iVar5 = 0;
do {
*(float *)(pVVar1 + iVar5 * 4) = *(float *)(param_1 + iVar5 * 4) - 1.0;
*(float *)(pVVar2 + iVar5 * 4) = *(float *)(param_2 + iVar5 * 4) + 1.0;
iVar5 = iVar5 + 1;
} while (iVar5 != 3);
CM_GetTraceDataForBSP(pVVar1,pVVar2,pCVar9);
piVar6 = (int *)SpatialPartition();
pcVar3 = *(code **)(*piVar6 + 0x38);
uVar7 = (**(code **)(*(int *)this + 0x6c))(this);
(*pcVar3)(piVar6,uVar7,pVVar1,pVVar2,0,pCVar9);
iVar5 = _DAT_0040b9d4;
if ((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) {
iVar8 = ThreadGetCurrentId();
if (iVar5 == iVar8) {
cVar4 = CVProfNode::ExitScope();
if (cVar4 != '\0') {
_DAT_0040b030 = (int *)_DAT_0040b030[0x19];
}
DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
}
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,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.