L L4D2node

CBasePlatTrain::PlayMovingSound

0x00b0a7a0 · 307 bytes · __thiscall

_ZN14CBasePlatTrain15PlayMovingSoundEv

Decompiled

undefined (1 param)

/* CBasePlatTrain::PlayMovingSound() */

void __thiscall CBasePlatTrain::PlayMovingSound(CBasePlatTrain *this)

{
  int *piVar1;
  undefined1 *puVar2;
  undefined4 uVar3;
  int iVar4;
  Vector local_48 [12];
  undefined **local_3c [11];
  
  StopMovingSound(this);
  if (*(int *)(this + 0x4b8) != 0) {
    piVar1 = (int *)CSoundEnvelopeController::GetController();
    (**(code **)(*(int *)this + 0x28c))(local_48,this);
    CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
    local_3c[0] = &PTR__CPASFilter_00bfaf28;
                    /* try { // try from 00b0a7f8 to 00b0a7fc has its CatchHandler @ 00b0a8ef */
    CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_3c,local_48);
    local_3c[0] = &PTR__CPASAttenuationFilter_00c08ec8;
                    /* try { // try from 00b0a80d to 00b0a829 has its CatchHandler @ 00b0a8ed */
    (**(code **)(*(int *)this + 0x28c))(local_48,this);
    CPASAttenuationFilter::Filter((CPASAttenuationFilter *)local_3c,local_48,0.8);
    puVar2 = &DAT_00d539c2;
    if (*(undefined1 **)(this + 0x4b8) != (undefined1 *)0x0) {
      puVar2 = *(undefined1 **)(this + 0x4b8);
    }
    if (*(int *)(this + 0x30) == 0) {
      iVar4 = 0;
    }
    else {
      iVar4 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
    }
                    /* try { // try from 00b0a883 to 00b0a8b7 has its CatchHandler @ 00b0a8d4 */
    uVar3 = (**(code **)(*piVar1 + 0x1c))
                      (piVar1,(CRecipientFilter *)local_3c,iVar4,6,puVar2,0x3f4ccccd,0x3f800000);
    *(undefined4 *)(this + 0x4c0) = uVar3;
    (**(code **)(*piVar1 + 8))(piVar1,uVar3,*(undefined4 *)(this + 0x4c4),0x42c80000,0);
    local_3c[0] = &PTR__CPASFilter_00bfaf28;
    CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_3c);
  }
  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)