CResponseSystem::ParseInclude
0x005b6350 · 362 bytes · __thiscall
_ZN15CResponseSystem12ParseIncludeEv
Decompiled
undefined (1 param)
/* CResponseSystem::ParseInclude() */
void __thiscall CResponseSystem::ParseInclude(CResponseSystem *this)
{
char cVar1;
undefined4 uVar2;
int iVar3;
int in_GS_OFFSET;
CUtlBuffer *this_00;
char *pcVar4;
char *pcVar5;
int local_158 [3];
int local_14c;
int local_138;
char local_120 [256];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (this[0x3d7c] == (CResponseSystem)0x0) {
if (0 < *(int *)(this + 0x3d8c)) {
iVar3 = *(int *)(this + 0x3d80);
uVar2 = RR_Parse(*(char **)(iVar3 + 8),(char *)(this + 0x38c8));
*(undefined4 *)(iVar3 + 8) = uVar2;
*(int *)(*(int *)(this + 0x3d80) + 0xc) = *(int *)(*(int *)(this + 0x3d80) + 0xc) + 1;
}
}
else {
this[0x3d7c] = (CResponseSystem)0x0;
}
pcVar5 = local_120;
V_snprintf(pcVar5,0x100,"scripts/%s",this + 0x38c8);
this_00 = (CUtlBuffer *)(this + 0x3d94);
pcVar4 = pcVar5;
iVar3 = CStringPool::Find((char *)this_00);
if (iVar3 == 0) {
this_00 = (CUtlBuffer *)local_158;
CUtlBuffer::CUtlBuffer(this_00,0,0,0);
/* try { // try from 005b647c to 005b64c7 has its CatchHandler @ 005b64cf */
cVar1 = (**(code **)(*(int *)(filesystem + 4) + 0x38))
(filesystem + 4,pcVar5,"GAME",this_00,0,0,0);
if (cVar1 == '\0') {
DevMsg("unable to load #included script %s\n",pcVar5);
pcVar4 = pcVar5;
}
else {
LoadFromBuffer(this,pcVar5,(char *)((local_14c - local_138) + local_158[0]));
pcVar4 = pcVar5;
}
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)this_00);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail(this_00,pcVar4);
}
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.