CAI_BehaviorBase::DrawDebugTextOverlays
0x005a5cf0 · 342 bytes · __thiscall
_ZN16CAI_BehaviorBase21DrawDebugTextOverlaysEi.part.28
Decompiled
undefined (2 params)
/* CAI_BehaviorBase::DrawDebugTextOverlays(int) [clone .part.28] */
int __thiscall CAI_BehaviorBase::DrawDebugTextOverlays(CAI_BehaviorBase *this,int param_1)
{
int iVar1;
int *in_EAX;
undefined4 uVar2;
char *pcVar3;
int in_EDX;
int iVar4;
int iVar5;
int iVar6;
int in_GS_OFFSET;
char local_220 [512];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
uVar2 = (**(code **)(*in_EAX + 300))();
V_snprintf(local_220,0x200,"Behv: %s, ",uVar2);
iVar4 = in_EDX + 1;
CBaseEntity::EntityText((CBaseEntity *)in_EAX[1],in_EDX,local_220,0.0,0xff,0xff,0xff,0xff);
if (0 < in_EAX[6]) {
iVar6 = 0;
iVar5 = iVar4;
do {
pcVar3 = (char *)(in_EAX[3] + iVar6 * 0x28);
iVar4 = iVar5;
if ((*pcVar3 != '\0') && (iVar1 = *(int *)(pcVar3 + 4), iVar1 != 0)) {
pcVar3 = *(char **)(iVar1 + 0x2c);
if (pcVar3 == (char *)0x0) {
pcVar3 = "Unknown";
}
V_snprintf(local_220,0x200," Schd [%d]: %s, ",iVar6,pcVar3);
iVar4 = iVar5 + 1;
CBaseEntity::EntityText((CBaseEntity *)in_EAX[1],iVar5,local_220,0.0,0xff,0xff,0xff,0xff);
}
iVar6 = iVar6 + 1;
iVar5 = iVar4;
} while (iVar6 < in_EAX[6]);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return iVar4;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.