CMapReslistGenerator::TrackDeletions
0x0018dd10 · 573 bytes · __thiscall
_ZN20CMapReslistGenerator14TrackDeletionsEPKc
Decompiled
undefined (2 params)
/* CMapReslistGenerator::TrackDeletions(char const*) */
void __thiscall CMapReslistGenerator::TrackDeletions(CMapReslistGenerator *this,char *param_1)
{
short sVar1;
char *pcVar2;
int in_GS_OFFSET;
CMapReslistGenerator *pCVar3;
char *__haystack;
CMapReslistGenerator *pCVar4;
short local_2024;
CUtlSymbol local_2022 [2];
CMapReslistGenerator local_2020 [4096];
char local_1020 [4096];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
V_strncpy((char *)local_2020,param_1,0x1000);
V_FixSlashes((char *)local_2020,'/');
_V_strlower((char *)local_2020);
pCVar4 = local_2020;
CUtlSymbolTable::Find((char *)&local_2024);
if (local_2024 != -1) {
pCVar4 = local_2020;
CUtlSymbolTable::AddString((char *)local_2022);
sVar1 = CUtlRBTree<CUtlSymbol,unsigned_short,bool(*)(CUtlSymbol_const&,CUtlSymbol_const&),CUtlMemory<UtlRBTreeNode_t<CUtlSymbol,unsigned_short>,unsigned_short>>
::Find((CUtlRBTree<CUtlSymbol,unsigned_short,bool(*)(CUtlSymbol_const&,CUtlSymbol_const&),CUtlMemory<UtlRBTreeNode_t<CUtlSymbol,unsigned_short>,unsigned_short>>
*)(this + 0x120),local_2022);
if (sVar1 == -1) {
Msg("--> Referenced file marked for deletion \"%s\"\n",local_2020,pCVar4);
CUtlRBTree<CUtlSymbol,unsigned_short,bool(*)(CUtlSymbol_const&,CUtlSymbol_const&),CUtlMemory<UtlRBTreeNode_t<CUtlSymbol,unsigned_short>,unsigned_short>>
::Insert((CUtlRBTree<CUtlSymbol,unsigned_short,bool(*)(CUtlSymbol_const&,CUtlSymbol_const&),CUtlMemory<UtlRBTreeNode_t<CUtlSymbol,unsigned_short>,unsigned_short>>
*)(this + 0x120),local_2022);
}
}
__haystack = ".mdl";
pCVar3 = local_2020;
pcVar2 = strstr((char *)local_2020,".mdl");
if (pcVar2 != (char *)0x0) {
__haystack = local_1020;
V_strncpy(__haystack,(char *)local_2020,0xff6);
pcVar2 = strstr(__haystack,".mdl");
V_strncpy(pcVar2,".vvd",10);
TrackDeletions(this,__haystack);
V_strncpy(pcVar2,".ani",10);
TrackDeletions(this,__haystack);
V_strncpy(pcVar2,".dx80.vtx",10);
TrackDeletions(this,__haystack);
V_strncpy(pcVar2,".dx90.vtx",10);
TrackDeletions(this,__haystack);
V_strncpy(pcVar2,".sw.vtx",10);
TrackDeletions(this,__haystack);
V_strncpy(pcVar2,".phy",10);
TrackDeletions(this,__haystack);
pCVar4 = (CMapReslistGenerator *)0xa;
V_strncpy(pcVar2,".jpg",10);
TrackDeletions(this,__haystack);
pCVar3 = this;
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail(pCVar3,__haystack,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.