PathFollower::Draw
0x00762590 · 685 bytes · __cdecl
_ZNK12PathFollower4DrawEPKN4Path7SegmentE
Decompiled
undefined (1 param)
/* PathFollower::Draw(Path::Segment const*) const */
void PathFollower::Draw(Segment *param_1)
{
int iVar1;
int iVar2;
float local_34;
float local_30;
undefined4 local_2c;
float local_28;
float local_24;
undefined4 local_20;
iVar1 = *(int *)(param_1 + 0x4758);
if (iVar1 == 0) {
return;
}
if (param_1[0x478c] != (Segment)0x0) {
local_28 = 0.0;
local_24 = 0.0;
local_20 = 0;
if (param_1[0x47a8] == (Segment)0x0) {
iVar2 = 0;
iVar1 = 0xff;
}
else {
iVar2 = 0xff;
iVar1 = 0;
}
NDebugOverlay::SweptBox
((Vector *)(param_1 + 0x4790),(Vector *)(param_1 + 0x479c),
(Vector *)(param_1 + 0x47c8),(Vector *)(param_1 + 0x47d4),(QAngle *)&local_28,iVar1,
iVar2,0,0xff,0.1);
if (param_1[0x47c4] == (Segment)0x0) {
iVar2 = 0;
iVar1 = 0xff;
}
else {
iVar2 = 0xff;
iVar1 = 0;
}
NDebugOverlay::SweptBox
((Vector *)(param_1 + 0x47ac),(Vector *)(param_1 + 0x47b8),
(Vector *)(param_1 + 0x47c8),(Vector *)(param_1 + 0x47d4),(QAngle *)&local_28,iVar1,
iVar2,0,0xff,0.1);
iVar1 = *(int *)(param_1 + 0x4758);
if (iVar1 == 0) goto LAB_007627c3;
}
NDebugOverlay::Sphere((Vector *)(iVar1 + 8),5.0,0xff,0xff,0,true,0.1);
iVar1 = *(int *)(param_1 + 0x4758);
local_24 = *(float *)(iVar1 + 0x40);
if ((*(int *)(iVar1 + 4) == 0) || (*(int *)(iVar1 + 4) == 2)) {
local_34 = *(float *)(iVar1 + 0x34) - local_24;
local_28 = *(float *)(iVar1 + 0x34) + local_24;
local_30 = *(float *)(iVar1 + 0x38);
local_2c = *(undefined4 *)(iVar1 + 0x3c);
local_24 = local_30;
}
else {
local_34 = *(float *)(iVar1 + 0x34);
local_30 = *(float *)(iVar1 + 0x38) - local_24;
local_24 = *(float *)(iVar1 + 0x38) + local_24;
local_2c = *(undefined4 *)(iVar1 + 0x3c);
local_28 = local_34;
}
local_20 = local_2c;
NDebugOverlay::Line((Vector *)&local_34,(Vector *)&local_28,0xff,0,0xff,true,0.1);
iVar1 = (**(code **)(*(int *)param_1 + 0x5c))(param_1,*(undefined4 *)(param_1 + 0x4758));
if (iVar1 != 0) {
NDebugOverlay::Line((Vector *)(iVar1 + 8),(Vector *)(*(int *)(param_1 + 0x4758) + 8),0xff,0xff,0
,true,0.1);
}
LAB_007627c3:
Path::Draw((Path *)param_1,(Segment *)0x0);
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.