CPointAngleSensor::DrawDebugTextOverlays
0x007d8140 · 736 bytes · __thiscall
_ZN17CPointAngleSensor21DrawDebugTextOverlaysEv
Decompiled
undefined (1 param)
/* CPointAngleSensor::DrawDebugTextOverlays() */
int __thiscall CPointAngleSensor::DrawDebugTextOverlays(CPointAngleSensor *this)
{
int iVar1;
float fVar2;
uint uVar3;
char *pcVar4;
char cVar5;
int iVar6;
undefined *puVar7;
CBaseEntity *pCVar8;
int in_GS_OFFSET;
longdouble lVar9;
CBaseEntity *local_230;
float local_224;
char local_220 [512];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar6 = CBaseEntity::DrawDebugTextOverlays((CBaseEntity *)this);
if (((byte)this[0x110] & 1) != 0) {
uVar3 = *(uint *)(this + 0x44c);
local_230 = (CBaseEntity *)0x0;
if (((uVar3 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar3 >> 0xc)) {
uVar3 = *(uint *)(this + 0x448);
}
else {
local_230 = *(CBaseEntity **)(puVar7 + 4);
uVar3 = *(uint *)(this + 0x448);
}
pCVar8 = (CBaseEntity *)0x0;
if (uVar3 != 0xffffffff) {
pCVar8 = (CBaseEntity *)0x0;
puVar7 = g_pEntityList + (uVar3 & 0xfff) * 0x10;
if ((puVar7 != (undefined *)0xfffffffc) && (*(uint *)(puVar7 + 8) == uVar3 >> 0xc)) {
pCVar8 = *(CBaseEntity **)(puVar7 + 4);
}
}
cVar5 = IsFacingWithinTolerance(this,pCVar8,local_230,*(float *)(this + 0x454),&local_224);
lVar9 = (longdouble)__acosf_finite(local_224);
V_snprintf(local_220,0x200,"delta ang (dot) : %.2f (%f)",(double)((float)lVar9 * 57.295776),
(double)local_224);
CBaseEntity::EntityText((CBaseEntity *)this,iVar6,local_220,0.0,0xff,0xff,0xff,0xff);
fVar2 = *(float *)(this + 0x454);
lVar9 = (longdouble)__acosf_finite(fVar2);
V_snprintf(local_220,0x200,"tolerance ang (dot): %.2f (%f)",(double)((float)lVar9 * 57.295776),
(double)fVar2);
CBaseEntity::EntityText((CBaseEntity *)this,iVar6 + 1,local_220,0.0,0xff,0xff,0xff,0xff);
pcVar4 = "vote_cast_yes";
iVar1 = iVar6 + 2;
if (cVar5 == '\0') {
pcVar4 = "vote_cast_no";
}
iVar6 = iVar6 + 3;
V_snprintf(local_220,0x200,"facing: %s",pcVar4 + 10);
CBaseEntity::EntityText((CBaseEntity *)this,iVar1,local_220,0.0,0xff,0xff,0xff,0xff);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return iVar6;
}
/* 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.