L L4D2node

CBaseEntity::DispatchResponse

0x00613dd0 · 720 bytes · __thiscall

_ZN11CBaseEntity16DispatchResponseEPKc

Decompiled

undefined (2 params)

/* CBaseEntity::DispatchResponse(char const*) */

void __thiscall CBaseEntity::DispatchResponse(CBaseEntity *this,char *param_1)

{
  char cVar1;
  int *piVar2;
  int *piVar3;
  int iVar4;
  undefined4 *puVar5;
  int in_GS_OFFSET;
  Vector local_228 [12];
  AI_CriteriaSet local_21c [32];
  undefined **local_1fc [8];
  AI_Response local_1dc [188];
  char local_120 [256];
  int local_20;
  
  puVar5 = (undefined4 *)&stack0xfffffd94;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  piVar2 = (int *)(**(code **)(*(int *)this + 0xf8))();
  if (piVar2 != (int *)0x0) {
    AI_CriteriaSet::AI_CriteriaSet(local_21c);
                    /* try { // try from 00613e2b to 00613e64 has its CatchHandler @ 006140a7 */
    AI_CriteriaSet::AppendCriteria(local_21c,"concept",param_1,5.0);
    (**(code **)(*(int *)this + 0x200))();
    piVar3 = (int *)UTIL_GetLocalPlayer();
    if (piVar3 != (int *)0x0) {
      (**(code **)(*piVar3 + 0x72c))();
    }
    AI_Response::AI_Response(local_1dc);
                    /* try { // try from 00613e80 to 00613f9a has its CatchHandler @ 006140f4 */
    cVar1 = (**(code **)(*piVar2 + 8))();
    puVar5 = (undefined4 *)&stack0xfffffd94;
    if (cVar1 != '\0') {
      AI_Response::GetResponse(local_1dc,local_120,0x100);
      if (local_1dc[0] == (AI_Response)0x2) {
        iVar4 = SENTENCEG_Lookup(local_120);
        puVar5 = (undefined4 *)&stack0xfffffd94;
        if (iVar4 != -1) {
          (**(code **)(*(int *)this + 0x28c))();
          CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_1fc);
          local_1fc[0] = &PTR__CPASFilter_00bfaf28;
                    /* try { // try from 00613fb8 to 00613fbc has its CatchHandler @ 006140e2 */
          CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_1fc,local_228);
          local_1fc[0] = &PTR__CPASAttenuationFilter_00c08ec8;
                    /* try { // try from 00613fd6 to 00613ffe has its CatchHandler @ 006140dd */
          (**(code **)(*(int *)this + 0x28c))();
          puVar5 = (undefined4 *)&stack0xfffffd8c;
          CPASAttenuationFilter::Filter((CPASAttenuationFilter *)local_1fc,local_228,0.8);
                    /* try { // try from 00614002 to 0061407d has its CatchHandler @ 006140b9 */
          AI_Response::GetSoundLevel(local_1dc);
          EmitSentenceByIndex();
          local_1fc[0] = &PTR__CPASFilter_00bfaf28;
          CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_1fc);
        }
      }
      else if (local_1dc[0] == (AI_Response)0x3) {
        InstancedScriptedScene
                  ((CBaseFlex *)0x0,local_120,(CHandle *)0x0,0.0,false,(AI_Response *)0x0,false,
                   (IRecipientFilter *)0x0);
        puVar5 = (undefined4 *)&stack0xfffffd94;
      }
      else {
        puVar5 = (undefined4 *)&stack0xfffffd94;
        if (local_1dc[0] == (AI_Response)0x1) {
          EmitSound(this,local_120,0.0,(float *)0x0);
          puVar5 = (undefined4 *)&stack0xfffffd94;
        }
      }
    }
    *puVar5 = local_1dc;
    puVar5[-1] = 0x613e8f;
    AI_Response::~AI_Response((AI_Response *)*puVar5);
    *puVar5 = local_21c;
    puVar5[-1] = 0x613e97;
    AI_CriteriaSet::~AI_CriteriaSet((AI_CriteriaSet *)*puVar5);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  *(undefined1 **)((int)puVar5 + -4) = &LAB_006140a7;
  __stack_chk_fail();
}

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)