CPointTemplate::PerformPrecache
0x007df080 · 208 bytes · __thiscall
_ZN14CPointTemplate15PerformPrecacheEv
Decompiled
undefined (1 param)
/* CPointTemplate::PerformPrecache() */
void __thiscall CPointTemplate::PerformPrecache(CPointTemplate *this)
{
int iVar1;
int iVar2;
char cVar3;
undefined1 *puVar4;
char *pcVar5;
int iVar6;
int local_34;
char *local_30 [4];
int local_20 [4];
iVar1 = *(int *)(this + 0x4a0);
if (iVar1 == 0) {
puVar4 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x154) != (undefined1 *)0x0) {
puVar4 = *(undefined1 **)(this + 0x154);
}
Msg("Precache called on a point_template that has no templates: %s\n",puVar4);
}
else {
Templates_StartUniqueInstance();
iVar6 = 0;
local_34 = 0;
if (0 < iVar1) {
do {
iVar2 = *(int *)(*(int *)(this + 0x494) + iVar6);
if ((((byte)this[0x148] & 2) == 0) &&
(cVar3 = Templates_IndexRequiresEntityIOFixup(iVar2), cVar3 != '\0')) {
pcVar5 = (char *)Templates_GetEntityIOFixedMapData(iVar2);
}
else {
Templates_FindByIndex((int)local_30);
pcVar5 = local_30[0];
if (local_30[0] == (char *)0x0) {
pcVar5 = "";
}
}
iVar6 = iVar6 + 0x44;
local_20[0] = Templates_GetStringSize(iVar2);
MapEntity_PrecacheEntity(pcVar5,local_20);
local_34 = local_34 + 1;
} while (local_34 != iVar1);
}
}
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.