INextBot::DebugConColorMsg
0x00754fc0 · 556 bytes · __thiscall
_ZN8INextBot16DebugConColorMsgE16NextBotDebugTypeRK5ColorPKcz
Decompiled
undefined (4 params)
/* INextBot::DebugConColorMsg(NextBotDebugType, Color const&, char const*, ...) */
void __thiscall
INextBot::DebugConColorMsg(INextBot *this,uint param_2,Color *param_3,char *param_4,...)
{
undefined4 *puVar1;
bool bVar2;
char cVar3;
int iVar4;
uint *puVar5;
int in_GS_OFFSET;
NextBotDebugLineType *local_124;
char local_120 [256];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if ((*(int *)(developer._28_4_ + 0x30) == 0) || (cVar3 = IsDebugging(this,param_2), cVar3 == '\0')
) {
bVar2 = false;
}
else {
V_vsnprintf(local_120,0x100,param_4,&stack0x00000014);
ConColorMsg(param_3,"%s",local_120);
bVar2 = true;
}
if (*(int *)(NextBotDebugHistory._28_4_ + 0x30) == 0) {
if (*(int *)(this + 0x228) != 0) {
ResetDebugHistory(this);
}
goto LAB_0075500c;
}
if (param_2 == 0x80) goto LAB_0075500c;
if (!bVar2) {
V_vsnprintf(local_120,0x100,param_4,&stack0x00000014);
}
iVar4 = *(int *)(this + 0x228);
if ((-1 < iVar4 + -1) &&
(puVar5 = *(uint **)(*(int *)(this + 0x21c) + (iVar4 + -1) * 4), *puVar5 == param_2)) {
puVar5 = puVar5 + 1;
iVar4 = _V_strstr((char *)puVar5,"\n");
if (iVar4 == 0) {
V_strncat((char *)puVar5,local_120,0x100,-1);
goto LAB_0075500c;
}
iVar4 = *(int *)(this + 0x228);
}
local_124 = (NextBotDebugLineType *)0x0;
if (iVar4 == 100) {
puVar1 = *(undefined4 **)(this + 0x21c);
local_124 = (NextBotDebugLineType *)*puVar1;
_V_memmove(puVar1,puVar1 + 1,0x18c);
*(int *)(this + 0x228) = *(int *)(this + 0x228) + -1;
if (local_124 == (NextBotDebugLineType *)0x0) goto LAB_0075507b;
}
else {
LAB_0075507b:
local_124 = ::operator_new(0x104);
}
*(uint *)local_124 = param_2;
V_strncpy((char *)(local_124 + 4),local_120,0x100);
CUtlVector<INextBot::NextBotDebugLineType*,CUtlMemory<INextBot::NextBotDebugLineType*,int>>::
InsertBefore((CUtlVector<INextBot::NextBotDebugLineType*,CUtlMemory<INextBot::NextBotDebugLineType*,int>>
*)(this + 0x21c),*(int *)(this + 0x228),&local_124);
LAB_0075500c:
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.