L L4D2node

CBaseCombatWeapon::DisplayAltFireHudHint

0x0040b220 · 186 bytes · __thiscall

_ZN17CBaseCombatWeapon21DisplayAltFireHudHintEv

Decompiled

undefined (1 param)

/* CBaseCombatWeapon::DisplayAltFireHudHint() */

void __thiscall CBaseCombatWeapon::DisplayAltFireHudHint(CBaseCombatWeapon *this)

{
  int iVar1;
  int iVar2;
  undefined1 *puVar3;
  CBaseEntity *pCVar4;
  int in_GS_OFFSET;
  undefined **local_11c;
  undefined1 local_118;
  char local_117 [259];
  undefined4 local_14;
  int local_10;
  
  local_118 = 1;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  local_11c = &PTR_InitQuietTruncation_00c08ee8;
  local_117[0] = '\0';
  local_14 = 0;
  puVar3 = &DAT_00d539c2;
  if (*(undefined1 **)(this + 0x7c) != (undefined1 *)0x0) {
    puVar3 = *(undefined1 **)(this + 0x7c);
  }
  CFmtStrN<256>::sprintf((CFmtStrN<256> *)&local_11c,"#valve_hint_alt_%s",puVar3);
  pCVar4 = (CBaseEntity *)GetOwner(this);
  UTIL_HudHintText(pCVar4,local_117);
  iVar2 = gpGlobals;
  this[0x1484] = (CBaseCombatWeapon)0x1;
  *(int *)(this + 0x147c) = *(int *)(this + 0x147c) + 1;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  *(float *)(this + 0x148c) = *(float *)(iVar2 + 0xc) + 7.0;
  if (local_10 == iVar1) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)