CWeaponChainsawSpawn::GetWeaponModel
0x008d6c70 · 99 bytes · __cdecl
_ZNK20CWeaponChainsawSpawn14GetWeaponModelEv
Decompiled
undefined (0 params)
/* CWeaponChainsawSpawn::GetWeaponModel() const */
int CWeaponChainsawSpawn::GetWeaponModel(void)
{
ushort uVar1;
ushort uVar2;
int iVar3;
uVar1 = LookupWeaponInfoSlot("weapon_chainsaw");
uVar2 = GetInvalidWeaponInfoHandle();
if (uVar1 != uVar2) {
iVar3 = GetFileWeaponInfoFromHandle(uVar1);
if (iVar3 != 0) {
iVar3 = __dynamic_cast(iVar3,&FileWeaponInfo_t::typeinfo,&CCSWeaponInfo::typeinfo,0);
if (iVar3 != 0) {
return iVar3 + 0xf6;
}
}
}
return 0;
}
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.