L L4D2node

CWeaponCSBaseGun::Deploy

0x00442260 · 136 bytes · __thiscall

_ZN16CWeaponCSBaseGun6DeployEv

Decompiled

undefined (1 param)

/* CWeaponCSBaseGun::Deploy() */

undefined4 __thiscall CWeaponCSBaseGun::Deploy(CWeaponCSBaseGun *this)

{
  CBaseEdict *this_00;
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  
  iVar1 = CTerrorWeapon::GetPlayerOwner((CTerrorWeapon *)this);
  if (iVar1 != 0) {
    *(undefined4 *)(this + 0x14f4) = 0x3e4ccccd;
    if (*(int *)(iVar1 + 0x2850) != 0) {
      if (*(char *)(iVar1 + 0x6c) == '\0') {
        this_00 = *(CBaseEdict **)(iVar1 + 0x30);
        if (this_00 != (CBaseEdict *)0x0) {
          *(uint *)this_00 = *(uint *)this_00 | 0x101;
          iVar3 = CBaseEdict::GetChangeAccessor(this_00);
          *(undefined2 *)(iVar3 + 2) = 0;
        }
      }
      else {
        *(byte *)(iVar1 + 0x70) = *(byte *)(iVar1 + 0x70) | 1;
      }
      *(undefined4 *)(iVar1 + 0x2850) = 0;
    }
    this[0x14f0] = (CWeaponCSBaseGun)0x0;
    *(undefined4 *)(this + 0x17dc) = 0xbf800000;
    uVar2 = CTerrorWeapon::Deploy((CTerrorWeapon *)this);
    return uVar2;
  }
  return 0;
}

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)