CBaseCombatCharacter::Weapon_CanUse
0x005ef660 · 132 bytes · __thiscall
_ZN20CBaseCombatCharacter13Weapon_CanUseEP17CBaseCombatWeapon
Decompiled
undefined (2 params)
/* CBaseCombatCharacter::Weapon_CanUse(CBaseCombatWeapon*) */
undefined4 __thiscall
CBaseCombatCharacter::Weapon_CanUse(CBaseCombatCharacter *this,CBaseCombatWeapon *param_1)
{
int iVar1;
int iVar2;
undefined4 uVar3;
int iVar4;
int iVar5;
iVar1 = (**(code **)(*(int *)param_1 + 0x594))(param_1);
iVar5 = 0;
iVar2 = (**(code **)(*(int *)param_1 + 0x598))(param_1);
if (iVar2 < 1) {
return 0;
}
do {
if (*(char *)(iVar1 + 8) != '\0') {
uVar3 = (**(code **)(*(int *)this + 0x454))(this,*(undefined4 *)(iVar1 + 4));
iVar4 = (**(code **)(*(int *)this + 0x340))(this,uVar3);
if (iVar4 == -1) {
return 0;
}
}
iVar5 = iVar5 + 1;
iVar1 = iVar1 + 0xc;
} while (iVar5 != iVar2);
return 1;
}
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.