L L4D2node

CGasCan::SetViewModel

0x00537d10 · 89 bytes · __thiscall

_ZN7CGasCan12SetViewModelEv

Decompiled

undefined (1 param)

/* CGasCan::SetViewModel() */

void __thiscall CGasCan::SetViewModel(CGasCan *this)

{
  char cVar1;
  CBasePlayer *this_00;
  int iVar2;
  
  CBaseCombatWeapon::SetViewModel((CBaseCombatWeapon *)this);
  this_00 = (CBasePlayer *)CBaseCombatWeapon::GetOwner((CBaseCombatWeapon *)this);
  if (this_00 != (CBasePlayer *)0x0) {
    cVar1 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
    if (cVar1 != '\0') {
      iVar2 = CBasePlayer::GetViewModel(this_00,*(int *)(this + 0x13f8));
      if (iVar2 != 0) {
        *(undefined4 *)(iVar2 + 0x458) = *(undefined4 *)(this + 0x458);
      }
    }
  }
  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)