L L4D2node

CFuncRotating::RampPitchVol

0x00632b60 · 548 bytes · __thiscall

_ZN13CFuncRotating12RampPitchVolEv

Decompiled

undefined (1 param)

/* CFuncRotating::RampPitchVol() */

void __thiscall CFuncRotating::RampPitchVol(CFuncRotating *this)

{
  int iVar1;
  int iVar2;
  float fVar3;
  float fVar4;
  undefined **local_80 [8];
  undefined4 local_60;
  undefined1 *local_5c;
  float local_58;
  int local_54;
  undefined4 local_50;
  int local_4c;
  undefined4 local_48;
  undefined4 local_44;
  undefined4 local_40;
  undefined1 local_3c;
  undefined1 local_3b;
  undefined1 local_3a;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined2 local_20;
  
  iVar2 = 0xff;
  fVar4 = *(float *)(this + 0x454) * (ABS(*(float *)(this + 0x11c)) / *(float *)(this + 0x45c));
  fVar3 = 0.0;
  if (0.0 <= fVar4) {
    fVar3 = fVar4;
  }
  fVar4 = (ABS(*(float *)(this + 0x11c)) / *(float *)(this + 0x45c)) * 70.0 + 30.0;
  if (1.0 <= fVar3) {
    fVar3 = 1.0;
  }
  if (fVar4 <= 255.0) {
    if (fVar4 <= 0.0) {
      fVar4 = 0.0;
    }
    iVar2 = (int)fVar4;
    if (iVar2 == 100) {
      iVar2 = 99;
    }
  }
  fVar4 = *(float *)(this + 0x450);
  if (((byte)this[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
  }
  CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_80);
  local_80[0] = &PTR__CPASFilter_00bfaf28;
                    /* try { // try from 00632c2d to 00632c31 has its CatchHandler @ 00632d8c */
  CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_80,(Vector *)(this + 0x2e0));
  local_80[0] = &PTR__CPASAttenuationFilter_00c08ec8;
                    /* try { // try from 00632c54 to 00632c58 has its CatchHandler @ 00632dc6 */
  CPASAttenuationFilter::Filter((CPASAttenuationFilter *)local_80,(Vector *)(this + 0x2e0),fVar4);
                    /* try { // try from 00632c5c to 00632c60 has its CatchHandler @ 00632dc2 */
  CRecipientFilter::MakeReliable((CRecipientFilter *)local_80);
  local_20 = 0xffff;
  local_48 = 0;
  local_44 = 0;
  local_40 = 0;
  local_5c = &DAT_00d539c2;
  if (*(undefined1 **)(this + 0x464) != (undefined1 *)0x0) {
    local_5c = *(undefined1 **)(this + 0x464);
  }
  local_3c = 1;
  local_3b = 0;
  local_54 = 0;
  local_3a = 0;
  local_38 = 0xffffffff;
  local_34 = 0;
  local_30 = 0;
  local_2c = 0;
  local_28 = 0;
  local_24 = 0;
  local_60 = 6;
  if (*(float *)(this + 0x450) != 0.0) {
    local_54 = (int)(20.0 / *(float *)(this + 0x450) + 50.0);
  }
  local_50 = 3;
  if (*(int *)(this + 0x30) == 0) {
    iVar1 = 0;
  }
  else {
    iVar1 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
  }
  local_58 = fVar3;
  local_4c = iVar2;
                    /* try { // try from 00632d34 to 00632d38 has its CatchHandler @ 00632d9e */
  CBaseEntity::EmitSound((IRecipientFilter *)local_80,iVar1,(EmitSound_t *)&local_60);
  local_28 = 0;
  CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)&local_34);
  local_24 = local_34;
  CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)&local_34);
  local_80[0] = &PTR__CPASFilter_00bfaf28;
  CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_80);
  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)