Witch::Precache
0x00a47cb0 · 338 bytes · __thiscall
_ZN5Witch8PrecacheEv
Decompiled
undefined (1 param)
/* Witch::Precache() */
void __thiscall Witch::Precache(Witch *this)
{
void *pvVar1;
int iVar2;
CBaseCombatCharacter::Precache((CBaseCombatCharacter *)this);
if (*(int *)(this + 0xfc) != 0) {
return;
}
iVar2 = 0;
if (0 < DAT_0102651c) {
do {
pvVar1 = *(void **)(WitchModels + iVar2 * 4);
if (pvVar1 != (void *)0x0) {
operator_delete__(pvVar1);
}
iVar2 = iVar2 + 1;
} while (iVar2 < DAT_0102651c);
}
DAT_0102651c = 0;
PrecachePlayerModelAndMaterials
((CBaseAnimating *)this,"models/infected/witch.mdl","WitchVariant",
(CUtlVector *)&WitchModels);
PrecacheParticleSystem("witch_eye_glow");
CBaseEntity::PrecacheScriptSound("WitchZombie.Despair");
CBaseEntity::PrecacheScriptSound("WanderWitchZombie.Despair");
CBaseEntity::PrecacheScriptSound("WitchZombie.Scream");
CBaseEntity::PrecacheScriptSound("WitchZombie.Rage");
CBaseEntity::PrecacheScriptSound("WitchZombie.Pain");
CBaseEntity::PrecacheScriptSound("WitchZombie.PainFire");
CBaseEntity::PrecacheScriptSound("WitchZombie.Surprised");
CBaseEntity::PrecacheScriptSound("WitchZombie.GrowlLow");
CBaseEntity::PrecacheScriptSound("WitchZombie.GrowlMedium");
CBaseEntity::PrecacheScriptSound("WitchZombie.GrowlHigh");
CBaseEntity::PrecacheScriptSound("WitchZombie.Die");
CBaseEntity::PrecacheScriptSound("WitchZombie.HeadShot");
CBaseEntity::PrecacheScriptSound("WitchZombie.ShredVictim");
CBaseEntity::PrecacheScriptSound("WitchZombie.RetreatHorror");
CBaseEntity::PrecacheScriptSound("WitchZombie.RageBeforeKillingFrenzy");
CBaseEntity::PrecacheScriptSound("WitchZombie.KillingFrenzy");
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.