CScriptJournal::DumpEntityInfoToSq
0x009074c0 · 606 bytes · __thiscall
_ZN14CScriptJournal18DumpEntityInfoToSqEPKcR10CUtlVectorIP13CTerrorPlayer10CUtlMemoryIS4_iEEb
Decompiled
undefined (4 params)
/* CScriptJournal::DumpEntityInfoToSq(char const*, CUtlVector<CTerrorPlayer*,
CUtlMemory<CTerrorPlayer*, int> >&, bool) */
void __thiscall
CScriptJournal::DumpEntityInfoToSq
(CScriptJournal *this,char *param_1,CUtlVector *param_2,bool param_3)
{
float fVar1;
float fVar2;
float fVar3;
int iVar4;
CBaseEntity *this_00;
code *pcVar5;
char cVar6;
undefined4 uVar7;
undefined4 uVar8;
int iVar9;
char *pcVar10;
int iVar11;
int in_GS_OFFSET;
char *local_454;
char local_420 [1024];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (param_1 == (char *)0x0) {
V_sprintf_safe<1024u>(local_420,"");
}
else {
V_sprintf_safe<1024u>(local_420,"\t\t%s = [ ",param_1);
}
local_454 = local_420;
iVar11 = 0;
if (0 < *(int *)(param_2 + 0xc)) {
do {
this_00 = *(CBaseEntity **)(*(int *)param_2 + iVar11 * 4);
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
fVar1 = *(float *)(this_00 + 0x2e0);
fVar2 = *(float *)(this_00 + 0x2e4);
fVar3 = *(float *)(this_00 + 0x2e8);
iVar4 = *(int *)(this_00 + 0x100);
cVar6 = (**(code **)(*(int *)this_00 + 0x7e8))(this_00);
uVar7 = (**(code **)(*(int *)this_00 + 0x544))(this_00);
if (*(int *)(this_00 + 0x30) == 0) {
iVar9 = 0;
}
else {
iVar9 = *(int *)(this_00 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
pcVar10 = "";
if (iVar11 != 0) {
pcVar10 = ", ";
}
iVar11 = iVar11 + 1;
V_sprintfcat_safe<1024u>
(local_454,"%s[%d, %d, %.1f, %.1f, %.1f, %d] ",pcVar10,iVar9,uVar7,(double)fVar1,
(double)fVar2,(double)fVar3,((-(uint)(cVar6 == '\0') & 2) - 1) * iVar4);
} while (iVar11 < *(int *)(param_2 + 0xc));
}
if (param_3) {
V_sprintfcat_safe<1024u>(local_454,"]\n");
}
pcVar5 = *(code **)(*(int *)(g_pFullFileSystem + 4) + 4);
uVar7 = *(undefined4 *)(this + 0x10);
uVar8 = _V_strlen(local_454);
(*pcVar5)(g_pFullFileSystem + 4,local_454,uVar8,uVar7);
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
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.