L L4D2node

CBaseCombatWeapon::DefaultDeploy

0x004085a0 · 908 bytes · __thiscall

_ZN17CBaseCombatWeapon13DefaultDeployEPcS0_iS0_

Decompiled

undefined (5 params)

/* CBaseCombatWeapon::DefaultDeploy(char*, char*, int, char*) */

undefined4 __thiscall
CBaseCombatWeapon::DefaultDeploy
          (CBaseCombatWeapon *this,char *param_1,char *param_2,int param_3,char *param_4)

{
  CBaseEdict *pCVar1;
  char cVar2;
  undefined4 uVar3;
  CBasePlayer *this_00;
  int iVar4;
  int iVar5;
  CStudioHdr *pCVar6;
  CStudioHdr *pCVar7;
  longdouble lVar8;
  float fVar9;
  undefined1 local_24 [20];
  
  uVar3 = (**(code **)(*(int *)this + 0x40c))(this);
  if (((char)uVar3 == '\0') && (cVar2 = (**(code **)(*(int *)this + 0x528))(this), cVar2 != '\0')) {
    return uVar3;
  }
  this_00 = (CBasePlayer *)GetOwner(this);
  if ((this_00 != (CBasePlayer *)0x0) &&
     (cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar2 != '\0')) {
    uVar3 = (**(code **)(*(int *)this_00 + 300))(this_00);
    if ((char)uVar3 == '\0') {
      return uVar3;
    }
    CBasePlayer::SetAnimationExtension(this_00,param_4);
    (**(code **)(*(int *)this + 0x3fc))(this);
    (**(code **)(*(int *)this + 0x3f0))(this,param_3);
    iVar4 = *(int *)(this + 0x494);
    fVar9 = *(float *)(gpGlobals + 0xc);
    pCVar6 = *(CStudioHdr **)(this + 0x13e0);
    if (pCVar6 == (CStudioHdr *)0x0) {
      iVar5 = CBaseEntity::GetModel((CBaseEntity *)this);
      if (iVar5 == 0) {
        pCVar6 = *(CStudioHdr **)(this + 0x13e0);
      }
      else {
        CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
        pCVar6 = *(CStudioHdr **)(this + 0x13e0);
      }
      pCVar7 = (CStudioHdr *)0x0;
      if (pCVar6 != (CStudioHdr *)0x0) goto LAB_004087a8;
    }
    else {
LAB_004087a8:
      pCVar7 = (CStudioHdr *)0x0;
      if (*(int *)pCVar6 != 0) {
        pCVar7 = pCVar6;
      }
    }
    lVar8 = (longdouble)CBaseAnimating::SequenceDuration((CBaseAnimating *)this,pCVar7,iVar4);
    fVar9 = (float)lVar8 + fVar9;
    if (fVar9 != *(float *)(this_00 + 0x17dc)) {
      if (this_00[0x6c] == (CBasePlayer)0x0) {
        pCVar1 = *(CBaseEdict **)(this_00 + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar4 + 2) = 0;
        }
      }
      else {
        this_00[0x70] = (CBasePlayer)((byte)this_00[0x70] | 1);
      }
      *(float *)(this_00 + 0x17dc) = fVar9;
    }
  }
  iVar4 = *(int *)(this + 0x494);
  fVar9 = *(float *)(gpGlobals + 0xc);
  pCVar6 = *(CStudioHdr **)(this + 0x13e0);
  if (pCVar6 == (CStudioHdr *)0x0) {
    iVar5 = CBaseEntity::GetModel((CBaseEntity *)this);
    if (iVar5 == 0) {
      pCVar6 = *(CStudioHdr **)(this + 0x13e0);
    }
    else {
      CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
      pCVar6 = *(CStudioHdr **)(this + 0x13e0);
    }
    pCVar7 = (CStudioHdr *)0x0;
    if (pCVar6 != (CStudioHdr *)0x0) goto LAB_00408605;
  }
  else {
LAB_00408605:
    pCVar7 = (CStudioHdr *)0x0;
    if (*(int *)pCVar6 != 0) {
      pCVar7 = pCVar6;
    }
  }
  lVar8 = (longdouble)CBaseAnimating::SequenceDuration((CBaseAnimating *)this,pCVar7,iVar4);
  fVar9 = (float)lVar8 + fVar9;
  if (fVar9 != *(float *)(this + 0x13fc)) {
    if (this[0x6c] == (CBaseCombatWeapon)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar4 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseCombatWeapon)((byte)this[0x70] | 1);
    }
    *(float *)(this + 0x13fc) = fVar9;
  }
  iVar4 = *(int *)(this + 0x494);
  fVar9 = *(float *)(gpGlobals + 0xc);
  pCVar6 = *(CStudioHdr **)(this + 0x13e0);
  if (pCVar6 == (CStudioHdr *)0x0) {
    iVar5 = CBaseEntity::GetModel((CBaseEntity *)this);
    if (iVar5 == 0) {
      pCVar6 = *(CStudioHdr **)(this + 0x13e0);
    }
    else {
      CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
      pCVar6 = *(CStudioHdr **)(this + 0x13e0);
    }
    pCVar7 = (CStudioHdr *)0x0;
    if (pCVar6 == (CStudioHdr *)0x0) goto LAB_00408664;
  }
  pCVar7 = (CStudioHdr *)0x0;
  if (*(int *)pCVar6 != 0) {
    pCVar7 = pCVar6;
  }
LAB_00408664:
  lVar8 = (longdouble)CBaseAnimating::SequenceDuration((CBaseAnimating *)this,pCVar7,iVar4);
  fVar9 = (float)lVar8 + fVar9;
  if (fVar9 != *(float *)(this + 0x1400)) {
    if (this[0x6c] == (CBaseCombatWeapon)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar4 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseCombatWeapon)((byte)this[0x70] | 1);
    }
    *(float *)(this + 0x1400) = fVar9;
  }
  iVar4 = gpGlobals;
  *(undefined4 *)(this + 0x148c) = 0;
  this[0x1484] = (CBaseCombatWeapon)0x0;
  this[0x1485] = (CBaseCombatWeapon)0x0;
  *(float *)(this + 0x1488) = *(float *)(iVar4 + 0xc) + 5.0;
  (**(code **)(*(int *)this + 0x430))(this,1);
  QueueAttack(this,0);
  CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)0x0);
  return 1;
}

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)