CMapReslistGenerator::OnResourcePrecachedFullPath
0x0018d0e0 · 666 bytes · __thiscall
_ZN20CMapReslistGenerator27OnResourcePrecachedFullPathEPKc
Decompiled
undefined (2 params)
/* CMapReslistGenerator::OnResourcePrecachedFullPath(char const*) */
void __thiscall
CMapReslistGenerator::OnResourcePrecachedFullPath(CMapReslistGenerator *this,char *param_1)
{
char *pcVar1;
CUtlString *pCVar2;
int iVar3;
int iVar4;
int in_GS_OFFSET;
CUtlString *pCVar5;
CUtlString *pCVar6;
CUtlString *this_00;
CUtlString *pCVar7;
CUtlString *pCVar8;
char local_114c [24];
short local_1134 [8];
CUtlString local_1124 [260];
char local_1020 [4096];
int local_20;
this_00 = (CUtlString *)local_1134;
pCVar6 = local_1124;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
V_strncpy((char *)pCVar6,param_1,0x104);
_V_strlower((char *)pCVar6);
V_FixSlashes((char *)pCVar6,'/');
pCVar7 = (CUtlString *)(this + 0x28);
pCVar5 = this_00;
pCVar8 = pCVar6;
pCVar2 = pCVar7;
CUtlSymbolTable::Find((char *)this_00);
if (local_1134[0] == -1) {
pCVar8 = pCVar6;
CUtlSymbolTable::AddString(local_114c);
pcVar1 = strstr((char *)pCVar6,".mdl");
if (pcVar1 != (char *)0x0) {
V_strncpy(local_1020,(char *)pCVar6,0xff6);
pCVar2 = (CUtlString *)strstr(local_1020,".mdl");
V_strncpy((char *)pCVar2,".vvd",10);
OnResourcePrecachedFullPath(this,local_1020);
V_strncpy((char *)pCVar2,".ani",10);
OnResourcePrecachedFullPath(this,local_1020);
V_strncpy((char *)pCVar2,".dx90.vtx",10);
OnResourcePrecachedFullPath(this,local_1020);
V_strncpy((char *)pCVar2,".phy",10);
OnResourcePrecachedFullPath(this,local_1020);
pCVar8 = (CUtlString *)0xa;
V_strncpy((char *)pCVar2,".jpg",10);
OnResourcePrecachedFullPath(this,local_1020);
}
pCVar7 = host_parms;
iVar3 = V_stristr((char *)pCVar6,(char *)host_parms);
pCVar5 = pCVar6;
if (iVar3 != 0) {
pCVar5 = host_parms;
iVar4 = _V_strlen((char *)host_parms);
pCVar6 = (CUtlString *)(iVar3 + 1 + iVar4);
if (pCVar6 != (CUtlString *)0x0) {
if (this[5] == (CMapReslistGenerator)0x0) {
CUtlString::CUtlString(this_00,(char *)pCVar6);
pCVar7 = this_00;
/* try { // try from 0018d335 to 0018d339 has its CatchHandler @ 0018d385 */
pCVar2 = (CUtlString *)
CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
::Find((CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
*)(this + 0x174),this_00);
pCVar5 = this_00;
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)this_00);
if (pCVar2 == (CUtlString *)&DAT_ffffffff) {
CUtlString::CUtlString(this_00,(char *)pCVar6);
pCVar7 = this_00;
/* try { // try from 0018d36a to 0018d36e has its CatchHandler @ 0018d397 */
CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
::Insert((CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
*)(this + 0x174),this_00);
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)this_00);
pCVar5 = this_00;
}
}
else {
LogToEngineReslist(this,(char *)pCVar6);
pCVar5 = (CUtlString *)this;
pCVar7 = pCVar6;
}
}
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail(pCVar5,pCVar7,pCVar8,pCVar2);
}
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.