CDownloadListGenerator::SetStringTable
0x00140660 · 590 bytes · __thiscall
_ZN22CDownloadListGenerator14SetStringTableEP19INetworkStringTable
Decompiled
undefined (2 params)
/* CDownloadListGenerator::SetStringTable(INetworkStringTable*) */
void __thiscall
CDownloadListGenerator::SetStringTable(CDownloadListGenerator *this,INetworkStringTable *param_1)
{
CDownloadListGenerator *pCVar1;
char cVar2;
KeyValues *pKVar3;
IBaseFileSystem *pIVar4;
int iVar5;
KeyValues *pKVar6;
char *pcVar7;
int in_GS_OFFSET;
char *pcVar8;
char local_1124 [260];
char local_1020 [4096];
int local_20;
pcVar7 = local_1020;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
*(INetworkStringTable **)(this + 0x17c) = param_1;
CUtlSymbolTable::RemoveAll((CUtlSymbolTable *)(this + 0x144));
EncodeWhiteList(this);
pCVar1 = this + 0x100;
V_snprintf(pcVar7,0x1000,"maps\\%s.bsp",pCVar1);
pcVar8 = pcVar7;
OnResourcePrecached(this,pcVar7);
pKVar3 = KeyValues::operator_new((KeyValues *)0x2c,(uint)pcVar8);
/* try { // try from 001406fc to 00140700 has its CatchHandler @ 001408c7 */
KeyValues::KeyValues(pKVar3,"ModInfo",(IKeyValuesSystem *)0x0,false);
pIVar4 = (IBaseFileSystem *)0x0;
if (g_pFileSystem != 0) {
pIVar4 = (IBaseFileSystem *)(g_pFileSystem + 4);
}
cVar2 = KeyValues::LoadFromFile(pKVar3,pIVar4,"gameinfo.txt",(char *)0x0);
if (cVar2 == '\0') {
KeyValues::deleteThis();
}
else {
iVar5 = KeyValues::GetInt(pKVar3,"nodegraph",1);
KeyValues::deleteThis();
if (iVar5 == 0) goto LAB_0014076b;
}
V_snprintf(pcVar7,0x1000,"maps\\graphs\\%s.ain",pCVar1);
OnResourcePrecached(this,pcVar7);
LAB_0014076b:
V_snprintf(pcVar7,0x1000,"maps\\%s.nav",pCVar1);
OnResourcePrecached(this,pcVar7);
pKVar3 = KeyValues::operator_new((KeyValues *)0x2c,(uint)pcVar7);
/* try { // try from 001407c2 to 001407c6 has its CatchHandler @ 001408b5 */
KeyValues::KeyValues(pKVar3,"resourefiles",(IKeyValuesSystem *)0x0,false);
V_snprintf(local_1124,0x104,"maps/%s.res",pCVar1);
pIVar4 = (IBaseFileSystem *)0x0;
if (g_pFileSystem != 0) {
pIVar4 = (IBaseFileSystem *)(g_pFileSystem + 4);
}
pKVar6 = pKVar3;
cVar2 = KeyValues::LoadFromFile(pKVar3,pIVar4,local_1124,"GAME");
if (cVar2 != '\0') {
for (pKVar6 = (KeyValues *)KeyValues::GetFirstSubKey(pKVar3); pKVar6 != (KeyValues *)0x0;
pKVar6 = (KeyValues *)KeyValues::GetNextKey(pKVar6)) {
pcVar7 = (char *)KeyValues::GetName(pKVar6);
OnResourcePrecached(this,pcVar7);
}
KeyValues::deleteThis();
pKVar6 = pKVar3;
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail(pKVar6);
}
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.