CDirectorSurvivalMode::DrawDebugNonVirtual
0x008befa0 · 1840 bytes · __thiscall
_ZN21CDirectorSurvivalMode19DrawDebugNonVirtualEi
Decompiled
undefined (2 params)
/* CDirectorSurvivalMode::DrawDebugNonVirtual(int) */
int __thiscall CDirectorSurvivalMode::DrawDebugNonVirtual(CDirectorSurvivalMode *this,int param_1)
{
float fVar1;
undefined4 uVar2;
uint uVar3;
undefined4 uVar4;
int iVar5;
int iVar6;
int iVar7;
int in_GS_OFFSET;
longdouble lVar8;
int local_170;
int local_16c [9];
undefined4 auStack_148 [6];
undefined1 local_130;
undefined **local_12c;
undefined1 local_128;
char local_127 [259];
undefined4 local_24;
int local_20;
local_128 = 1;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
uVar3 = 0;
local_127[0] = '\0';
local_12c = &PTR_InitQuietTruncation_00c08ee8;
local_24 = 0;
if (*this != (CDirectorSurvivalMode)0x0) {
local_16c[0] = 0;
local_16c[1] = 0;
local_16c[2] = 0;
local_130 = 0;
do {
*(undefined4 *)((int)local_16c + uVar3 + 0xc) = 0;
uVar3 = uVar3 + 4;
} while (uVar3 < 0x18);
uVar3 = 0;
do {
*(undefined4 *)((int)auStack_148 + uVar3) = 0;
uVar3 = uVar3 + 4;
} while (uVar3 < 0x18);
ForEachTerrorPlayer<ZombieCounter>((ZombieCounter *)local_16c);
AddDebugTextLine(0.01,0.0,param_1,"SURVIVAL MODE",0xff,0xff,0xff,0xff,0.01023);
iVar5 = 0;
iVar6 = param_1;
do {
iVar6 = iVar6 + 1;
uVar2 = *(undefined4 *)(this + iVar5 * 4 + 0x50);
iVar7 = iVar5 + 1;
uVar4 = ZombieClassName(iVar7);
CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_12c," %d %sS (%d max)",local_16c[iVar5 + 3],uVar4,uVar2);
AddDebugTextLine(0.01,0.0,iVar6,local_127,0xff,0xff,0,0xff,0.01023);
iVar5 = iVar7;
} while (iVar7 != 6);
local_170 = param_1 + 7;
if (*this != (CDirectorSurvivalMode)0x0) {
uVar2 = *(undefined4 *)(this + 0x68);
iVar6 = CDirector::GetPlayerCount(TheDirector,3,2);
CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_12c," %d Specials on Team (%d max)",iVar6 - local_16c[0],
uVar2);
local_170 = param_1 + 8;
AddDebugTextLine(0.01,0.0,param_1 + 7,local_127,0xff,0xff,0,0xff,0.01023);
}
CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_12c," %d Tanks (%d max)",local_16c[0],
*(undefined4 *)(this + 0x6c));
AddDebugTextLine(0.01,0.0,local_170,local_127,0xff,0xff,0,0xff,0.01023);
fVar1 = *(float *)(this + 0x10);
lVar8 = (longdouble)CountdownTimer::Now();
iVar6 = (int)(fVar1 - (float)lVar8);
if ((float)iVar6 < fVar1 - (float)lVar8) {
iVar6 = iVar6 + 1;
}
iVar5 = 0;
if (-1 < iVar6) {
fVar1 = *(float *)(this + 0x10);
lVar8 = (longdouble)CountdownTimer::Now();
iVar5 = (int)(fVar1 - (float)lVar8);
if ((float)iVar5 < fVar1 - (float)lVar8) {
iVar5 = iVar5 + 1;
}
}
CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_12c," [%02ds] %s (Interval: %f)",iVar5,"Horde Wave",
(double)*(float *)(this + 0x74));
AddDebugTextLine(0.01,0.0,local_170 + 1,local_127,0xff,0xff,0,0xff,0.01023);
fVar1 = *(float *)(this + 0x1c);
lVar8 = (longdouble)CountdownTimer::Now();
iVar6 = (int)(fVar1 - (float)lVar8);
if ((float)iVar6 < fVar1 - (float)lVar8) {
iVar6 = iVar6 + 1;
}
iVar5 = 0;
if (-1 < iVar6) {
fVar1 = *(float *)(this + 0x1c);
lVar8 = (longdouble)CountdownTimer::Now();
iVar5 = (int)(fVar1 - (float)lVar8);
if ((float)iVar5 < fVar1 - (float)lVar8) {
iVar5 = iVar5 + 1;
}
}
CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_12c," [%02ds] %s (Interval: %f)",iVar5,"Tank Wave",
(double)*(float *)(this + 0x78));
AddDebugTextLine(0.01,0.0,local_170 + 2,local_127,0xff,0xff,0,0xff,0.01023);
fVar1 = *(float *)(this + 0x28);
lVar8 = (longdouble)CountdownTimer::Now();
iVar6 = (int)(fVar1 - (float)lVar8);
if ((float)iVar6 < fVar1 - (float)lVar8) {
iVar6 = iVar6 + 1;
}
iVar5 = 0;
if (-1 < iVar6) {
fVar1 = *(float *)(this + 0x28);
lVar8 = (longdouble)CountdownTimer::Now();
iVar5 = (int)(fVar1 - (float)lVar8);
if ((float)iVar5 < fVar1 - (float)lVar8) {
iVar5 = iVar5 + 1;
}
}
CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_12c," [%02ds] %s (Interval: %f)",iVar5,"Special Wave",
(double)*(float *)(this + 0x7c));
AddDebugTextLine(0.01,0.0,local_170 + 3,local_127,0xff,0xff,0,0xff,0.01023);
fVar1 = *(float *)(this + 0x40);
lVar8 = (longdouble)CountdownTimer::Now();
iVar6 = (int)(fVar1 - (float)lVar8);
if ((float)iVar6 < fVar1 - (float)lVar8) {
iVar6 = iVar6 + 1;
}
iVar5 = 0;
if (-1 < iVar6) {
fVar1 = *(float *)(this + 0x40);
lVar8 = (longdouble)CountdownTimer::Now();
iVar5 = (int)(fVar1 - (float)lVar8);
if ((float)iVar5 < fVar1 - (float)lVar8) {
iVar5 = iVar5 + 1;
}
}
CFmtStrN<256>::sprintf
((CFmtStrN<256> *)&local_12c," [%02ds] %s (Interval: %f)",iVar5,&DAT_00ce6374,
(double)*(float *)(this + 0x80));
param_1 = local_170 + 5;
AddDebugTextLine(0.01,0.0,local_170 + 4,local_127,0xff,0xff,0,0xff,0.01023);
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
}
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.