CTerrorWeaponInfo::GetViewModelName
0x00570d80 · 163 bytes · __thiscall
_ZNK17CTerrorWeaponInfo16GetViewModelNameEPKcb
Decompiled
undefined (3 params)
/* CTerrorWeaponInfo::GetViewModelName(char const*, bool) const */
CTerrorWeaponInfo * __thiscall
CTerrorWeaponInfo::GetViewModelName(CTerrorWeaponInfo *this,char *param_1,bool param_2)
{
KeyValues *this_00;
CTerrorWeaponInfo *pCVar1;
int in_GS_OFFSET;
CFmtStrN<256> local_12c [5];
char local_127 [263];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if ((!param_2) || (pCVar1 = this + 0xc78, this[0xc78] == (CTerrorWeaponInfo)0x0)) {
this_00 = (KeyValues *)CTerrorGameRules::GetMissionCurrentMap((KeyValues **)0x0);
if (this_00 != (KeyValues *)0x0) {
CFmtStrN<256>::CFmtStrN(local_12c,"%sArmsVariant",param_1);
pCVar1 = (CTerrorWeaponInfo *)KeyValues::GetString(this_00,local_127,"");
if ((pCVar1 != (CTerrorWeaponInfo *)0x0) && (*pCVar1 != (CTerrorWeaponInfo)0x0))
goto LAB_00570e07;
}
pCVar1 = this + 0xa6;
}
LAB_00570e07:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return pCVar1;
}
/* 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.