L L4D2node

CBaseButton::ButtonBackHome

0x00634dd0 · 327 bytes · __thiscall

_ZN11CBaseButton14ButtonBackHomeEv

Decompiled

undefined (1 param)

/* CBaseButton::ButtonBackHome() */

void __thiscall CBaseButton::ButtonBackHome(CBaseButton *this)

{
  CBaseEdict *this_00;
  uint uVar1;
  int iVar2;
  CBaseEntity *pCVar3;
  undefined *puVar4;
  undefined1 local_14 [8];
  
  *(undefined4 *)(this + 0x440) = 1;
  if (this[0x58c] != (CBaseButton)0x1) {
    if (this[0x6c] == (CBaseButton)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar2 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar2 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseButton)((byte)this[0x70] | 1);
    }
    this[0x58c] = (CBaseButton)0x1;
  }
  uVar1 = *(uint *)(this + 0x494);
  pCVar3 = (CBaseEntity *)0x0;
  if (((uVar1 != 0xffffffff) &&
      (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
    pCVar3 = *(CBaseEntity **)(puVar4 + 4);
  }
  COutputEvent::FireOutput((COutputEvent *)(this + 0x568),pCVar3,(CBaseEntity *)this,0.0);
  if ((*(uint *)(this + 0x148) & 0x100) == 0) {
    *(undefined4 *)(this + 0xd8) = 0;
    *(undefined4 *)(this + 0xdc) = 0;
  }
  else {
    *(code **)(this + 0xd8) = ButtonTouch;
    *(undefined4 *)(this + 0xdc) = 0;
  }
  if ((*(uint *)(this + 0x148) & 0x1000) != 0) {
    CBaseEntity::ThinkSet((_func_void *)local_14,(float)this,(char *)ButtonSpark);
    CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 0.5,(char *)0x0);
  }
  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)