L L4D2node

CTriggerCamera::InputEnable

0x00b1b270 · 306 bytes · __thiscall

_ZN14CTriggerCamera11InputEnableER11inputdata_t

Decompiled

undefined (2 params)

/* CTriggerCamera::InputEnable(inputdata_t&) */

void __thiscall CTriggerCamera::InputEnable(CTriggerCamera *this,inputdata_t *param_1)

{
  char *pcVar1;
  uint uVar2;
  undefined4 *puVar3;
  int *piVar4;
  uint *puVar5;
  undefined *puVar6;
  
  *(undefined4 *)(this + 0x440) = 0xffffffff;
  if (*(int *)(param_1 + 0x18) == 2) {
    pcVar1 = "";
    if (*(char **)(param_1 + 8) != (char *)0x0) {
      pcVar1 = *(char **)(param_1 + 8);
    }
    if (*pcVar1 != '\0') goto LAB_00b1b336;
LAB_00b1b2a6:
    uVar2 = *(uint *)(this + 0x440);
  }
  else {
    pcVar1 = (char *)variant_t::ToString((variant_t *)(param_1 + 8));
    if (*pcVar1 == '\0') goto LAB_00b1b2a6;
LAB_00b1b336:
    piVar4 = (int *)CGlobalEntityList::FindEntityByName
                              ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar1,
                               (CBaseEntity *)0x0,(CBaseEntity *)0x0,(CBaseEntity *)0x0,
                               (IEntityFindFilter *)0x0);
    if (piVar4 == (int *)0x0) {
      *(undefined4 *)(this + 0x440) = 0xffffffff;
      goto LAB_00b1b2d7;
    }
    puVar5 = (uint *)(**(code **)(*piVar4 + 0xc))(piVar4);
    uVar2 = *puVar5;
    *(uint *)(this + 0x440) = uVar2;
  }
  if ((((uVar2 != 0xffffffff) &&
       (puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar6 + 8) == uVar2 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)) {
    Enable(this);
    return;
  }
LAB_00b1b2d7:
  piVar4 = *(int **)param_1;
  if (piVar4 != (int *)0x0) {
    puVar3 = (undefined4 *)(**(code **)(*piVar4 + 0xc))(piVar4);
    *(undefined4 *)(this + 0x440) = *puVar3;
    Enable(this);
    return;
  }
  *(undefined4 *)(this + 0x440) = 0xffffffff;
  Enable(this);
  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)