L L4D2node

CEnvGlobal::InputSetCounter

0x006e79f0 · 144 bytes · __thiscall

_ZN10CEnvGlobal15InputSetCounterER11inputdata_t

Decompiled

undefined (2 params)

/* CEnvGlobal::InputSetCounter(inputdata_t&) */

void __thiscall CEnvGlobal::InputSetCounter(CEnvGlobal *this,inputdata_t *param_1)

{
  char *pcVar1;
  int iVar2;
  int iVar3;
  undefined1 *puVar4;
  undefined1 *puVar5;
  
  pcVar1 = *(char **)(this + 0x458);
  if (pcVar1 == (char *)0x0) {
    pcVar1 = "";
  }
  iVar2 = GlobalEntity_GetIndex(pcVar1);
  if (iVar2 < 0) {
    puVar4 = *(undefined1 **)(gpGlobals + 0x3c);
    if (puVar4 == (undefined1 *)0x0) {
      puVar4 = &DAT_00d539c2;
    }
    puVar5 = &DAT_00d539c2;
    if (*(undefined1 **)(this + 0x458) != (undefined1 *)0x0) {
      puVar5 = *(undefined1 **)(this + 0x458);
    }
    GlobalEntity_Add(puVar5,puVar4,1);
  }
  iVar2 = 0;
  if (*(int *)(param_1 + 0x18) == 5) {
    iVar2 = *(int *)(param_1 + 8);
  }
  pcVar1 = "";
  if (*(char **)(this + 0x458) != (char *)0x0) {
    pcVar1 = *(char **)(this + 0x458);
  }
  iVar3 = GlobalEntity_GetIndex(pcVar1);
  GlobalEntity_SetCounter(iVar3,iVar2);
  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)