L L4D2node

CTerrorWeapon::GetDeployDurationModifier

0x005740b0 · 264 bytes · __thiscall

_ZN13CTerrorWeapon25GetDeployDurationModifierEv

Decompiled

undefined (1 param)

/* CTerrorWeapon::GetDeployDurationModifier() */

longdouble __thiscall CTerrorWeapon::GetDeployDurationModifier(CTerrorWeapon *this)

{
  char cVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  CStudioHdr *pCVar5;
  CStudioHdr *pCVar6;
  longdouble lVar7;
  float fVar8;
  
  iVar2 = GetPlayerOwner(this);
  if (iVar2 == 0) {
    lVar7 = (longdouble)CBaseCombatWeapon::GetDeployDurationModifier();
    return lVar7;
  }
  iVar3 = CBaseCombatWeapon::GetWpnData((CBaseCombatWeapon *)this);
  pCVar6 = *(CStudioHdr **)(this + 0x13e0);
  iVar2 = *(int *)(this + 0x494);
  if (pCVar6 == (CStudioHdr *)0x0) {
    iVar4 = CBaseEntity::GetModel((CBaseEntity *)this);
    if (iVar4 == 0) {
      pCVar6 = *(CStudioHdr **)(this + 0x13e0);
    }
    else {
      CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
      pCVar6 = *(CStudioHdr **)(this + 0x13e0);
    }
    pCVar5 = (CStudioHdr *)0x0;
    if (pCVar6 == (CStudioHdr *)0x0) goto LAB_005740f3;
  }
  pCVar5 = (CStudioHdr *)0x0;
  if (*(int *)pCVar6 != 0) {
    pCVar5 = pCVar6;
  }
LAB_005740f3:
  lVar7 = (longdouble)CBaseAnimating::SequenceDuration((CBaseAnimating *)this,pCVar5,iVar2);
  if ((float)lVar7 != 0.0) {
    cVar1 = (**(code **)(*(int *)this + 0x674))(this);
    if (cVar1 == '\0') {
      fVar8 = *(float *)(iVar3 + 0xc40);
    }
    else {
      fVar8 = *(float *)(iVar3 + 0xc44);
    }
    if (0.0 < fVar8) {
      return (longdouble)(fVar8 / (float)lVar7);
    }
  }
  return (longdouble)1.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)