CTerrorPlayer::UpdateZombieDebugDraws
0x009fde90 · 573 bytes · __thiscall
_ZN13CTerrorPlayer22UpdateZombieDebugDrawsEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::UpdateZombieDebugDraws() */
void __thiscall CTerrorPlayer::UpdateZombieDebugDraws(CTerrorPlayer *this)
{
CTerrorPlayer CVar1;
int iVar2;
uint uVar3;
int iVar4;
int iVar5;
int in_GS_OFFSET;
undefined4 local_22c;
undefined4 local_228;
float local_224;
char local_220 [512];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (*(int *)(ZombieDebug._28_4_ + 0x30) != 0) {
iVar2 = (**(code **)(*(int *)this + 0x544))(this);
uVar3 = iVar2 - 1;
if (uVar3 < 8) {
CVar1 = this[0x14d];
iVar2 = *(int *)(CSWTCH_3710 + uVar3 * 4);
iVar5 = *(int *)(CSWTCH_3711 + uVar3 * 4);
iVar4 = *(int *)(CSWTCH_3712 + uVar3 * 4);
}
else {
iVar4 = 0;
CVar1 = this[0x14d];
iVar5 = 0xff;
iVar2 = 0xff;
}
if ((((byte)CVar1 & 8) != 0) &&
(CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
local_22c = *(undefined4 *)(this + 0x2e0);
local_228 = *(undefined4 *)(this + 0x2e4);
local_224 = *(float *)(this + 0x2e8) + 70.0;
NDebugOverlay::VertArrow
((Vector *)&local_22c,(Vector *)(this + 0x2e0),30.0,iVar2,iVar5,iVar4,0xff,true,0.1);
if (*(int *)(ZombieDebug._28_4_ + 0x30) != 0) {
iVar2 = (**(code **)(*(int *)this + 0x52c))(this);
if (iVar2 == 0) {
V_snprintf(local_220,0x200,"Flow: NULL");
}
else {
V_snprintf(local_220,0x200,"Flow: %3.2f",(double)*(float *)(iVar2 + 0x154));
}
if (*(int *)(this + 0x30) == 0) {
iVar2 = 0;
}
else {
iVar2 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
NDebugOverlay::EntityText(iVar2,1,local_220,0.1,0xff,0xff,0xff,0xff);
}
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.