L L4D2node

CBaseAbility::OnButtonPressed

0x004d1e00 · 49 bytes · __thiscall

_ZN12CBaseAbility15OnButtonPressedEv

Decompiled

undefined (1 param)

/* CBaseAbility::OnButtonPressed() */

void __thiscall CBaseAbility::OnButtonPressed(CBaseAbility *this)

{
  char cVar1;
  
  cVar1 = (**(code **)(*(int *)this + 0x32c))(this);
  if (cVar1 == '\0') {
    return;
  }
                    /* WARNING: Could not recover jumptable at 0x004d1e30. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  (**(code **)(*(int *)this + 0x330))();
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)