L L4D2node

CBaseEntity::InputAddOutput

0x00601210 · 207 bytes · __thiscall

_ZN11CBaseEntity14InputAddOutputER11inputdata_t

Decompiled

undefined (2 params)

/* CBaseEntity::InputAddOutput(inputdata_t&) */

void __thiscall CBaseEntity::InputAddOutput(CBaseEntity *this,inputdata_t *param_1)

{
  char *pcVar1;
  char *pcVar2;
  int in_GS_OFFSET;
  char local_124 [260];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(int *)(param_1 + 0x18) == 2) {
    pcVar1 = "";
    if (*(char **)(param_1 + 8) != (char *)0x0) {
      pcVar1 = *(char **)(param_1 + 8);
    }
  }
  else {
    pcVar1 = (char *)variant_t::ToString((variant_t *)(param_1 + 8));
  }
  V_strncpy(local_124,pcVar1,0x104);
  pcVar1 = strchr(local_124,0x20);
  if (pcVar1 == (char *)0x0) {
    Warning(
           "AddOutput input fired with bad string. Format: <output name> <targetname>,<inputname>,<parameter>,<delay>,<max times to fire (-1 == infinite)>\n"
           );
  }
  else {
    *pcVar1 = '\0';
    while (pcVar2 = strchr(pcVar1 + 1,0x3a), pcVar2 != (char *)0x0) {
      *pcVar2 = ',';
    }
    (**(code **)(*(int *)this + 0x84))(this,local_124,pcVar1 + 1);
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  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)