Action<SurvivorBot>::PrintStateToConsole
0x00915f10 · 853 bytes · __thiscall
_ZNK6ActionI11SurvivorBotE19PrintStateToConsoleEv
Decompiled
undefined (1 param)
/* Action<SurvivorBot>::PrintStateToConsole() const */
void __thiscall Action<SurvivorBot>::PrintStateToConsole(Action<SurvivorBot> *this)
{
uint uVar1;
char *pcVar2;
undefined4 *puVar3;
char *pcVar4;
char *pcVar5;
uint uVar6;
char cVar7;
int iVar8;
int iVar9;
int in_GS_OFFSET;
undefined4 local_13c;
undefined1 local_138;
undefined1 uStack_137;
undefined1 uStack_136;
undefined1 uStack_135;
undefined1 local_134;
undefined1 local_133;
undefined1 local_132;
undefined1 local_131;
undefined1 local_130;
undefined1 local_12f;
undefined1 local_12e;
undefined1 local_12d;
undefined1 local_12c;
undefined1 local_12b;
undefined1 local_12a;
undefined1 local_129;
undefined1 local_128;
undefined1 local_127;
undefined1 local_126;
undefined1 local_125;
undefined4 local_124;
char local_120;
char local_11f [255];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
pcVar2 = (char *)DebugString(this);
puVar3 = &local_13c;
do {
*puVar3 = 0;
puVar3 = puVar3 + 1;
} while (puVar3 != &local_124);
local_13c._0_1_ = 0xff;
local_13c._1_1_ = 0x96;
local_13c._2_1_ = 0x96;
local_13c._3_1_ = 0xff;
local_138 = 0x96;
uStack_137 = 0xff;
uStack_136 = 0x96;
uStack_135 = 0xff;
local_134 = 0x96;
local_133 = 0x96;
local_132 = 0xff;
local_131 = 0xff;
local_130 = 0xff;
local_12f = 0xff;
local_12e = 0x96;
local_12d = 0xff;
local_12c = 0x32;
local_12b = 0xff;
local_12a = 0xff;
local_129 = 0xff;
local_128 = 0xff;
local_127 = 0x96;
local_126 = 0xff;
local_125 = 0xff;
cVar7 = *pcVar2;
pcVar4 = &local_120;
if (cVar7 == '\0') {
iVar8 = 0;
}
else {
iVar9 = 0;
iVar8 = 0;
while( true ) {
*pcVar4 = cVar7;
cVar7 = *pcVar2;
if (cVar7 == '(') {
pcVar4[1] = '\0';
local_124 = (&local_13c)[iVar8];
if (iVar9 != 0) {
iVar9 = iVar9 + 1;
uVar1 = local_124 >> 8;
uVar6 = local_124 & 0xff;
local_124._0_3_ = (uint3)(byte)(int)((double)(local_124 >> 0x10 & 0xff) * 0.5) << 0x10;
local_124 = CONCAT13(0xff,(int3)local_124);
local_124 = CONCAT31(CONCAT21(local_124._2_2_,(char)(int)((double)(uVar1 & 0xff) * 0.5)),
(char)(int)((double)uVar6 * 0.5));
}
ConColorMsg((Color *)&local_124,"%s",&local_120);
cVar7 = pcVar2[1];
iVar8 = (iVar8 + 1) % 6;
pcVar4 = &local_120;
}
else {
if (cVar7 == ')') {
*pcVar4 = '\0';
local_124 = (&local_13c)[iVar8];
if (iVar9 != 0) {
iVar9 = iVar9 + -1;
uVar1 = local_124 >> 8;
uVar6 = local_124 & 0xff;
local_124._0_3_ = (uint3)(byte)(int)((double)(local_124 >> 0x10 & 0xff) * 0.5) << 0x10;
local_124 = CONCAT13(0xff,(int3)local_124);
local_124 = CONCAT31(CONCAT21(local_124._2_2_,(char)(int)((double)(uVar1 & 0xff) * 0.5))
,(char)(int)((double)uVar6 * 0.5));
}
iVar8 = iVar8 + -1;
ConColorMsg((Color *)&local_124,"%s",&local_120);
if (iVar8 == -1) {
iVar8 = 5;
}
local_120 = ')';
pcVar5 = local_11f;
}
else {
pcVar5 = pcVar4 + 1;
if ((cVar7 == '<') && (iVar9 == 0)) {
pcVar4[1] = '<';
pcVar2 = pcVar2 + 1;
pcVar4[2] = '\0';
ConColorMsg((Color *)(&local_13c + iVar8),"%s",&local_120);
iVar9 = 1;
pcVar5 = &local_120;
}
}
cVar7 = pcVar2[1];
pcVar4 = pcVar5;
}
if (cVar7 == '\0') break;
pcVar2 = pcVar2 + 1;
}
}
*pcVar4 = '\0';
ConColorMsg((Color *)(&local_13c + iVar8),"%s",&local_120);
ConColorMsg((Color *)(&local_13c + iVar8),"\n\n");
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.