CMeleeWeaponInfo::Precache
0x00543c30 · 102 bytes · __thiscall
_ZN16CMeleeWeaponInfo8PrecacheEv
Decompiled
undefined (1 param)
/* CMeleeWeaponInfo::Precache() */
void __thiscall CMeleeWeaponInfo::Precache(CMeleeWeaponInfo *this)
{
CMeleeWeaponInfo CVar1;
CMeleeWeaponInfo *pCVar2;
int iVar3;
if (this[8] == (CMeleeWeaponInfo)0x0) {
CVar1 = this[0x58];
}
else {
CBaseEntity::PrecacheModel((char *)(this + 8));
CVar1 = this[0x58];
}
if (CVar1 != (CMeleeWeaponInfo)0x0) {
CBaseEntity::PrecacheModel((char *)(this + 0x58));
}
iVar3 = 0x14;
pCVar2 = this + 0x5dd;
do {
while (*pCVar2 == (CMeleeWeaponInfo)0x0) {
pCVar2 = pCVar2 + 0x50;
iVar3 = iVar3 + -1;
if (iVar3 == 0) {
return;
}
}
CBaseEntity::PrecacheScriptSound((char *)pCVar2);
iVar3 = iVar3 + -1;
pCVar2 = pCVar2 + 0x50;
} while (iVar3 != 0);
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.