CC_Player_BugBaitSwap
0x00640330 · 179 bytes · unknown
_Z21CC_Player_BugBaitSwapv
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* CC_Player_BugBaitSwap() */
void CC_Player_BugBaitSwap(void)
{
code *pcVar1;
char cVar2;
CBaseCombatCharacter *this;
int *piVar3;
int iVar4;
char *pcVar5;
this = (CBaseCombatCharacter *)UTIL_GetCommandClient();
if (this != (CBaseCombatCharacter *)0x0) {
cVar2 = (**(code **)(*(int *)this + 0x16c))(this);
if (cVar2 != '\0') {
piVar3 = (int *)CBaseCombatCharacter::GetActiveWeapon(this);
if (piVar3 != (int *)0x0) {
pcVar1 = *(code **)(*engine + 0x9c);
iVar4 = UTIL_GetCommandClient();
(*pcVar1)(engine,*(undefined4 *)(iVar4 + 0x30),"cancelselect");
pcVar5 = (char *)(**(code **)(*piVar3 + 0x538))(piVar3);
iVar4 = _V_stricmp(pcVar5,"weapon_bugbait");
if (iVar4 == 0) {
(**(code **)(*(int *)this + 0x6b0))(this);
return;
}
(**(code **)(*(int *)this + 0x6b4))(this,"weapon_bugbait",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.