L L4D2node

CBaseEntity::DisconnectOutputFromScript

0x006052c0 · 259 bytes · __thiscall

_ZN11CBaseEntity26DisconnectOutputFromScriptEPKcS1_

Decompiled

undefined (3 params)

/* CBaseEntity::DisconnectOutputFromScript(char const*, char const*) */

void __thiscall
CBaseEntity::DisconnectOutputFromScript(CBaseEntity *this,char *param_1,char *param_2)

{
  CBaseEntityOutput *this_00;
  int iVar1;
  char *pcVar2;
  CEventAction *this_01;
  int local_20 [4];
  
  this_00 = (CBaseEntityOutput *)FindNamedOutput(this,param_1);
  if (this_00 == (CBaseEntityOutput *)0x0) {
    DevMsg();
    return;
  }
  AllocPooledString((char *)local_20);
  this_01 = *(CEventAction **)(this_00 + 0x14);
  if (this_01 != (CEventAction *)0x0) {
    do {
      if (((local_20[0] == *(int *)this_01) && (*(float *)(this_01 + 0xc) == 0.0)) &&
         (*(int *)(this_01 + 0x10) == -1)) {
        pcVar2 = *(char **)(this_01 + 4);
        if (*(char **)(this_01 + 4) == (char *)0x0) {
          pcVar2 = "";
        }
        iVar1 = _V_strcmp(pcVar2,"CallScriptFunction");
        if (iVar1 == 0) {
          pcVar2 = *(char **)(this_01 + 8);
          if (*(char **)(this_01 + 8) == (char *)0x0) {
            pcVar2 = "";
          }
          iVar1 = _V_strcmp(pcVar2,param_2);
          if (iVar1 == 0) {
            CBaseEntityOutput::RemoveEventAction(this_00,this_01);
            CEventAction::operator_delete(this_01,param_1);
            return;
          }
        }
      }
      this_01 = *(CEventAction **)(this_01 + 0x18);
    } while (this_01 != (CEventAction *)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)