L L4D2node

CWeaponCSBaseGun::ItemPostFrame

0x00442020 · 174 bytes · __thiscall

_ZN16CWeaponCSBaseGun13ItemPostFrameEv

Decompiled

undefined (1 param)

/* CWeaponCSBaseGun::ItemPostFrame() */

void __thiscall CWeaponCSBaseGun::ItemPostFrame(CWeaponCSBaseGun *this)

{
  CBasePlayer *this_00;
  int iVar1;
  
  this_00 = (CBasePlayer *)CTerrorWeapon::GetPlayerOwner((CTerrorWeapon *)this);
  if (this_00 == (CBasePlayer *)0x0) {
    return;
  }
  if ((*(float *)(this + 0x13fc) <= *(float *)(gpGlobals + 0xc)) &&
     (this_00[0x23d8] != (CBasePlayer)0x0)) {
    CBasePlayer::SetFOV(this_00,(CBaseEntity *)this_00,*(int *)(this_00 + 0x23dc),0.05,0);
    *(float *)(this + 0x17dc) = *(float *)(gpGlobals + 0xc) + 0.05;
    iVar1 = CBasePlayer::GetFOV(this_00);
    if (iVar1 == *(int *)(this_00 + 0x23dc)) {
      this_00[0x23d8] = (CBasePlayer)0x0;
    }
  }
  CTerrorWeapon::ItemPostFrame((CTerrorWeapon *)this);
  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)