CNetworkStringTableContainer::CreateDictionary
0x001a5920 · 448 bytes · __thiscall
_ZN28CNetworkStringTableContainer16CreateDictionaryEPKc
Decompiled
undefined (2 params)
/* CNetworkStringTableContainer::CreateDictionary(char const*) */
void __thiscall
CNetworkStringTableContainer::CreateDictionary(CNetworkStringTableContainer *this,char *param_1)
{
int *piVar1;
char cVar2;
bool bVar3;
int iVar4;
char *pcVar5;
CMapReslistGenerator *this_00;
int iVar6;
int in_GS_OFFSET;
int local_160;
CUtlBuffer local_15c [56];
char local_124 [260];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
V_snprintf(local_124,0x104,"maps/%s.bsp",param_1);
cVar2 = (**(code **)(*(int *)(g_pFileSystem + 4) + 0x2c))
(g_pFileSystem + 4,local_124,&DAT_002a076d);
if (cVar2 == '\0') {
Warning(
"#####################################################################################\n"
);
Warning("Can\'t recreate dictionary for %s, file must be writable!!!\n",local_124);
Warning(
"#####################################################################################\n"
);
}
else {
Msg("Creating dictionary %s\n",param_1);
CUtlBuffer::CUtlBuffer(local_15c,0,0,0);
local_160 = 0;
if (0 < *(int *)(this + 0x1c)) {
do {
piVar1 = *(int **)(*(int *)(this + 0x10) + local_160 * 4);
/* try { // try from 001a5a25 to 001a5a9b has its CatchHandler @ 001a5af0 */
if (((*(byte *)(piVar1 + 8) & 1) != 0) &&
(iVar4 = (**(code **)(*piVar1 + 0x10))(piVar1), 0 < iVar4)) {
iVar6 = 0;
do {
pcVar5 = (char *)(**(code **)(*piVar1 + 0x28))(piVar1,iVar6);
if (*pcVar5 != '\0') {
CUtlBuffer::PutString(local_15c,pcVar5);
}
iVar6 = iVar6 + 1;
} while (iVar6 != iVar4);
}
local_160 = local_160 + 1;
} while (local_160 < *(int *)(this + 0x1c));
}
this_00 = (CMapReslistGenerator *)MapReslistGenerator();
bVar3 = (bool)CMapReslistGenerator::IsCreatingForXbox(this_00);
CNetworkStringTableDictionaryManager::CacheNewStringTableForWriteToBSPOnLevelShutdown
((CNetworkStringTableDictionaryManager *)&g_StringTableDictionary,param_1,local_15c,
bVar3);
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_15c);
}
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.