DebugIntensity::operator()
0x0088bfd0 · 660 bytes · __thiscall
_ZN14DebugIntensityclEP13CTerrorPlayer
Decompiled
undefined (2 params)
/* DebugIntensity::TEMPNAMEPLACEHOLDERVALUE(CTerrorPlayer*) */
undefined4 __thiscall DebugIntensity::operator()(DebugIntensity *this,CTerrorPlayer *param_1)
{
float fVar1;
char cVar2;
CTerrorPlayer *pCVar3;
undefined4 uVar4;
int in_GS_OFFSET;
int iVar5;
int iVar6;
undefined **local_11c;
undefined1 local_118;
char local_117 [259];
undefined4 local_14;
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
pCVar3 = param_1;
cVar2 = (**(code **)(*(int *)param_1 + 300))(param_1);
if (cVar2 != '\0') {
pCVar3 = (CTerrorPlayer *)CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
cVar2 = IsASurvivorTeam((int)pCVar3);
if (cVar2 != '\0') {
fVar1 = *(float *)(param_1 + 12000);
local_11c = &PTR_InitQuietTruncation_00c08ee8;
local_118 = 1;
local_117[0] = '\0';
local_14 = 0;
if (fVar1 < 0.25) {
uVar4 = (**(code **)(*(int *)param_1 + 0xb8))(param_1);
CFmtStrN<256>::sprintf((CFmtStrN<256> *)&local_11c," %s: %3.2f (MILD)",uVar4,(double)fVar1)
;
iVar6 = 0xff;
iVar5 = 0;
}
else {
if (fVar1 < 0.5) {
uVar4 = (**(code **)(*(int *)param_1 + 0xb8))(param_1);
CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_11c," %s: %3.2f (MODERATE)",uVar4,(double)fVar1);
iVar6 = 0xff;
}
else if (0.75 <= fVar1) {
uVar4 = (**(code **)(*(int *)param_1 + 0xb8))(param_1);
CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_11c," %s: %3.2f (EXTREME)",uVar4,(double)fVar1);
iVar6 = 0;
}
else {
uVar4 = (**(code **)(*(int *)param_1 + 0xb8))();
CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_11c," %s: %3.2f (HIGH)",uVar4,(double)fVar1);
iVar6 = 0x80;
}
iVar5 = 0xff;
}
pCVar3 = *(CTerrorPlayer **)this;
AddDebugTextLine((float)pCVar3,*(float *)(this + 4),*(int *)(this + 8),local_117,iVar5,iVar6,0
,0xff,0.25);
*(int *)(this + 8) = *(int *)(this + 8) + 1;
if (*(int *)(this + 0xc) == 0) {
*(CTerrorPlayer **)(this + 0xc) = param_1;
}
}
}
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
return 1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail(pCVar3);
}
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.