L L4D2node

CTerrorPlayer::TrackSound

0x009c35e0 · 122 bytes · __thiscall

_ZN13CTerrorPlayer10TrackSoundEPKc

Decompiled

undefined (2 params)

/* CTerrorPlayer::TrackSound(char const*) */

void __thiscall CTerrorPlayer::TrackSound(CTerrorPlayer *this,char *param_1)

{
  int iVar1;
  int iVar2;
  char *local_14;
  undefined4 local_10;
  
  local_10 = 0;
  local_14 = (char *)0x0;
  if ((param_1 != (char *)0x0) && (*param_1 != '\0')) {
    local_14 = param_1;
  }
  iVar1 = *(int *)(this + 0x2b54);
  if (0 < iVar1) {
    if (local_14 == (char *)**(int **)(this + 0x2b48)) {
      return;
    }
    iVar2 = 0;
    do {
      iVar2 = iVar2 + 1;
      if (iVar2 == iVar1) goto LAB_009c3634;
    } while (local_14 != (char *)(*(int **)(this + 0x2b48))[iVar2 * 2]);
    if (-1 < iVar2) {
      return;
    }
  }
LAB_009c3634:
  CUtlVector<CTerrorPlayer::TrackedSoundType,CUtlMemory<CTerrorPlayer::TrackedSoundType,int>>::
  InsertBefore((CUtlVector<CTerrorPlayer::TrackedSoundType,CUtlMemory<CTerrorPlayer::TrackedSoundType,int>>
                *)(this + 0x2b48),iVar1,(TrackedSoundType *)&local_14);
  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)