CDownloadListGenerator::OnResourcePrecached
0x0013e820 · 665 bytes · __thiscall
_ZN22CDownloadListGenerator19OnResourcePrecachedEPKc
Decompiled
undefined (2 params)
/* CDownloadListGenerator::OnResourcePrecached(char const*) */
void __thiscall
CDownloadListGenerator::OnResourcePrecached(CDownloadListGenerator *this,char *param_1)
{
code *pcVar1;
int *piVar2;
char cVar3;
char *pcVar4;
int iVar5;
undefined4 uVar6;
int in_GS_OFFSET;
char local_13c [22];
short local_126;
char local_124 [260];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if ((*param_1 != '\0') && (*param_1 != '*')) {
cVar3 = V_IsAbsolutePath(param_1);
if (cVar3 == '\0') {
V_strncpy(local_124,param_1,0x104);
V_FixSlashes(local_124,'/');
CUtlSymbolTable::Find((char *)&local_126);
if (local_126 == -1) {
CUtlSymbolTable::AddString(local_13c);
cVar3 = (**(code **)(*(int *)(g_pFileSystem + 4) + 0x28))
(g_pFileSystem + 4,local_124,&DAT_002a076d);
if (cVar3 != '\0') {
pcVar4 = (char *)V_GetFileExtension(local_124);
iVar5 = _V_stricmp(pcVar4,"mdl");
if (iVar5 == 0) {
V_strncpy(pcVar4,"vvd",10);
OnResourcePrecached(this,local_124);
V_strncpy(pcVar4,"ani",10);
OnResourcePrecached(this,local_124);
V_strncpy(pcVar4,"dx90.vtx",10);
OnResourcePrecached(this,local_124);
V_strncpy(pcVar4,"phy",10);
OnResourcePrecached(this,local_124);
V_strncpy(pcVar4,"jpg",10);
OnResourcePrecached(this,local_124);
}
iVar5 = *(int *)(this + 0x140);
if (iVar5 != 0) {
(**(code **)(*(int *)(g_pFileSystem + 4) + 4))(g_pFileSystem + 4,&DAT_002cc2b5,1,iVar5);
pcVar1 = *(code **)(*(int *)(g_pFileSystem + 4) + 4);
uVar6 = _V_strlen(local_124);
(*pcVar1)(g_pFileSystem + 4,local_124,uVar6,iVar5);
(**(code **)(*(int *)(g_pFileSystem + 4) + 4))(g_pFileSystem + 4,&DAT_002af868,2,iVar5);
}
piVar2 = *(int **)(this + 0x17c);
if (piVar2 != (int *)0x0) {
(**(code **)(*piVar2 + 0x24))(piVar2,1,local_124,0xffffffff,0);
}
}
}
}
else {
Warning("*** CDownloadListGenerator::OnResourcePrecached: Encountered full path %s!\n",param_1
);
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.