CBaseAnimating::DrawDebugTextOverlays
0x005e4c90 · 1263 bytes · __thiscall
_ZN14CBaseAnimating21DrawDebugTextOverlaysEv
Decompiled
undefined (1 param)
/* CBaseAnimating::DrawDebugTextOverlays() */
int __thiscall CBaseAnimating::DrawDebugTextOverlays(CBaseAnimating *this)
{
uint uVar1;
int *piVar2;
int iVar3;
char *pcVar4;
int iVar5;
int in_GS_OFFSET;
int local_46c;
CStudioHdr *local_460;
float local_45c;
float local_458;
float local_454;
float local_450;
float local_44c;
float local_448;
float local_444;
float local_440;
float local_43c;
float local_438;
float local_434;
float local_430;
float local_42c;
float local_428;
float local_424;
char local_420 [1024];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_46c = CBaseEntity::DrawDebugTextOverlays((CBaseEntity *)this);
uVar1 = *(uint *)(this + 0x110);
if ((uVar1 & 1) != 0) {
GetSequenceName(this,*(int *)(this + 0x494));
V_snprintf(local_420,0x400,"Sequence: (%3d) %s",*(undefined4 *)(this + 0x494));
iVar5 = local_46c + 1;
CBaseEntity::EntityText((CBaseEntity *)this,local_46c,local_420,0.0,0xff,0xff,0,0xff);
pcVar4 = (char *)GetSequenceActivityName(this,*(int *)(this + 0x494));
if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {
V_snprintf(local_420,0x400,"Activity %s",pcVar4);
CBaseEntity::EntityText((CBaseEntity *)this,iVar5,local_420,0.0,0xff,0xff,0,0xff);
iVar5 = local_46c + 2;
}
V_snprintf(local_420,0x400,"Cycle: %.5f (%.5f)",(double)*(float *)(this + 0x490),
(double)*(float *)(this + 0x90));
CBaseEntity::EntityText((CBaseEntity *)this,iVar5,local_420,0.0,0xff,0xff,0,0xff);
local_46c = iVar5 + 1;
uVar1 = *(uint *)(this + 0x110);
}
if ((uVar1 & 0x100) != 0) {
local_460 = *(CStudioHdr **)(this + 0x13e0);
if (local_460 == (CStudioHdr *)0x0) {
iVar5 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar5 == 0) {
local_460 = *(CStudioHdr **)(this + 0x13e0);
}
else {
LockStudioHdr(this);
local_460 = *(CStudioHdr **)(this + 0x13e0);
}
if (local_460 == (CStudioHdr *)0x0) goto LAB_005e4cd4;
}
if (*(int *)local_460 != 0) {
for (iVar5 = 1; iVar3 = CStudioHdr::GetNumAttachments(local_460), iVar5 <= iVar3;
iVar5 = iVar5 + 1) {
GetAttachment(this,iVar5,(Vector *)&local_45c,(Vector *)&local_450,(Vector *)&local_444,
(Vector *)&local_438);
local_428 = local_44c * 4.0 + local_458;
local_424 = local_448 * 4.0 + local_454;
local_42c = local_450 * 4.0 + local_45c;
NDebugOverlay::Line((Vector *)&local_45c,(Vector *)&local_42c,0xff,0,0,true,0.05);
local_428 = local_440 * 4.0 + local_458;
local_424 = local_43c * 4.0 + local_454;
local_42c = local_444 * 4.0 + local_45c;
NDebugOverlay::Line((Vector *)&local_45c,(Vector *)&local_42c,0,0xff,0,true,0.05);
local_428 = local_434 * 4.0 + local_458;
local_424 = local_430 * 4.0 + local_454;
local_42c = local_438 * 4.0 + local_45c;
NDebugOverlay::Line((Vector *)&local_45c,(Vector *)&local_42c,0,0,0xff,true,0.05);
piVar2 = (int *)CStudioHdr::pAttachment(local_460,iVar5 + -1);
V_snprintf(local_420,0x100," < %s (%d)",(int)piVar2 + *piVar2);
NDebugOverlay::Text((Vector *)&local_45c,local_420,true,0.05);
}
}
}
LAB_005e4cd4:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_46c;
}
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.