L L4D2node

CEnvSoundscapeTriggerable::DelegateEndTouch

0x0082fa30 · 341 bytes · __thiscall

_ZN25CEnvSoundscapeTriggerable16DelegateEndTouchEP11CBaseEntity

Decompiled

undefined (2 params)

/* CEnvSoundscapeTriggerable::DelegateEndTouch(CBaseEntity*) */

void __thiscall
CEnvSoundscapeTriggerable::DelegateEndTouch(CEnvSoundscapeTriggerable *this,CBaseEntity *param_1)

{
  uint uVar1;
  int iVar2;
  undefined4 *puVar3;
  int iVar4;
  CEnvSoundscape *this_00;
  undefined *puVar5;
  undefined4 local_10;
  
  if ((param_1 != (CBaseEntity *)0x0) &&
     (iVar2 = __dynamic_cast(param_1,&CBaseEntity::typeinfo,&CBasePlayer::typeinfo,0), iVar2 != 0))
  {
    local_10 = 0xffffffff;
    if (this != (CEnvSoundscapeTriggerable *)0x0) {
      puVar3 = (undefined4 *)(**(code **)(*(int *)this + 0xc))(this);
      local_10 = *puVar3;
    }
    CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>::FindAndRemove
              ((CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>> *)
               (iVar2 + 0x1c68),(CHandle *)&local_10);
    iVar4 = *(int *)(iVar2 + 0x1c74);
    while (0 < iVar4) {
      uVar1 = **(uint **)(iVar2 + 0x1c68);
      if ((((uVar1 != 0xffffffff) &&
           (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
          (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) &&
         ((*(int *)(puVar5 + 4) != 0 &&
          (this_00 = (CEnvSoundscape *)
                     __dynamic_cast(*(int *)(puVar5 + 4),&CBaseEntity::typeinfo,&typeinfo,0),
          this_00 != (CEnvSoundscape *)0x0)))) {
        CEnvSoundscape::WriteAudioParamsTo(this_00,(audioparams_t *)(iVar2 + 0x1b9c));
        return;
      }
      CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>::ShiftElementsLeft
                ((CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>> *)
                 (iVar2 + 0x1c68),0,1);
      iVar4 = *(int *)(iVar2 + 0x1c74) + -1;
      *(int *)(iVar2 + 0x1c74) = iVar4;
    }
    if (*(int *)(iVar2 + 0x1c08) != 0) {
      (**(code **)(*(int *)(iVar2 + 0x1b9c) + 4))(iVar2 + 0x1b9c,iVar2 + 0x1c08);
      *(undefined4 *)(iVar2 + 0x1c08) = 0;
      return;
    }
  }
  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)