L L4D2node

CTerrorWeapon::Deploy

0x00574230 · 408 bytes · __thiscall

_ZN13CTerrorWeapon6DeployEv

Decompiled

undefined (1 param)

/* CTerrorWeapon::Deploy() */

undefined4 __thiscall CTerrorWeapon::Deploy(CTerrorWeapon *this)

{
  CBaseEdict *pCVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  undefined4 uVar5;
  CTerrorWeapon CVar6;
  undefined1 local_14 [8];
  
  iVar2 = GetPlayerOwner(this);
  if (iVar2 != 0) {
    uVar4 = *(uint *)(iVar2 + 0x1cb0);
    CVar6 = (CTerrorWeapon)((byte)uVar4 & 1 ^ 1);
    if (CVar6 != this[0x1531]) {
      if (this[0x6c] == (CTerrorWeapon)0x0) {
        pCVar1 = *(CBaseEdict **)(this + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
          iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar3 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CTerrorWeapon)((byte)this[0x70] | 1);
      }
      this[0x1531] = CVar6;
      uVar4 = *(uint *)(iVar2 + 0x1cb0);
    }
    CVar6 = (CTerrorWeapon)(((byte)(uVar4 >> 0xb) ^ 1) & 1);
    if (CVar6 != this[0x1530]) {
      if (this[0x6c] == (CTerrorWeapon)0x0) {
        pCVar1 = *(CBaseEdict **)(this + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
          iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar2 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CTerrorWeapon)((byte)this[0x70] | 1);
      }
      this[0x1530] = CVar6;
    }
    if (this[0x1532] != (CTerrorWeapon)0x0) {
      if (this[0x6c] == (CTerrorWeapon)0x0) {
        pCVar1 = *(CBaseEdict **)(this + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
          iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar2 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CTerrorWeapon)((byte)this[0x70] | 1);
      }
      this[0x1532] = (CTerrorWeapon)0x0;
    }
    if (this[0x1533] != (CTerrorWeapon)0x0) {
      if (this[0x6c] == (CTerrorWeapon)0x0) {
        pCVar1 = *(CBaseEdict **)(this + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
          iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar2 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CTerrorWeapon)((byte)this[0x70] | 1);
      }
      this[0x1533] = (CTerrorWeapon)0x0;
    }
    CBaseEntity::ThinkSet((_func_void *)local_14,(float)this,(char *)0x0);
    SuppressHelpingHands(this,2.0);
    uVar5 = CWeaponCSBase::Deploy((CWeaponCSBase *)this);
    return uVar5;
  }
  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)