L L4D2node

CAISound::InputEmitAISound

0x0082cb10 · 318 bytes · __cdecl

_ZN8CAISound16InputEmitAISoundER11inputdata_t

Decompiled

undefined (1 param)

/* CAISound::InputEmitAISound(inputdata_t&) */

void CAISound::InputEmitAISound(inputdata_t *param_1)

{
  CBaseEntity *this;
  undefined1 *puVar1;
  undefined4 local_18;
  undefined4 local_14;
  undefined4 local_10;
  
  if (((byte)param_1[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
  }
  local_18 = *(undefined4 *)(param_1 + 0x2e0);
  local_14 = *(undefined4 *)(param_1 + 0x2e4);
  local_10 = *(undefined4 *)(param_1 + 0x2e8);
  if (*(char **)(param_1 + 0x450) != (char *)0x0) {
    this = (CBaseEntity *)
           CGlobalEntityList::FindEntityByName
                     ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,*(char **)(param_1 + 0x450),
                      (CBaseEntity *)0x0,(CBaseEntity *)0x0,(CBaseEntity *)0x0,
                      (IEntityFindFilter *)0x0);
    if (this == (CBaseEntity *)0x0) {
      puVar1 = &DAT_00d539c2;
      if (*(undefined1 **)(param_1 + 0x450) != (undefined1 *)0x0) {
        puVar1 = *(undefined1 **)(param_1 + 0x450);
      }
      DevWarning("Warning- ai_sound cannot find proxy entity named \'%s\'. Using self.\n",puVar1);
    }
    else {
      if (((byte)this[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(this);
      }
      local_18 = *(undefined4 *)(this + 0x2e0);
      local_14 = *(undefined4 *)(this + 0x2e4);
      local_10 = *(undefined4 *)(this + 0x2e8);
    }
  }
  CSoundEnt::InsertSound
            (*(uint *)(param_1 + 0x444) | *(uint *)(param_1 + 0x440),(Vector *)&local_18,
             *(int *)(param_1 + 0x448),*(float *)(param_1 + 0x44c),(CBaseEntity *)param_1,0,
             (CBaseEntity *)0x0);
  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)