L L4D2node

CEnvScreenOverlay::InputSwitchOverlay

0x00695310 · 273 bytes · __thiscall

_ZN17CEnvScreenOverlay18InputSwitchOverlayER11inputdata_t

Decompiled

undefined (2 params)

/* CEnvScreenOverlay::InputSwitchOverlay(inputdata_t&) */

void __thiscall CEnvScreenOverlay::InputSwitchOverlay(CEnvScreenOverlay *this,inputdata_t *param_1)

{
  float fVar1;
  CBaseEdict *pCVar2;
  int iVar3;
  uint uVar4;
  int iVar5;
  
  iVar5 = 1;
  if (*(int *)(param_1 + 0x18) == 5) {
    uVar4 = (int)(*(int *)(param_1 + 8) - 1U) >> 0x1f;
    iVar5 = (*(int *)(param_1 + 8) - 1U ^ uVar4) - uVar4;
    iVar3 = *(int *)(this + iVar5 * 4 + 0x440);
  }
  else {
    iVar3 = *(int *)(this + 0x444);
  }
  if (iVar3 == 0) {
    Warning();
    return;
  }
  if (*(int *)(this + 0x494) != iVar5) {
    if (this[0x6c] == (CEnvScreenOverlay)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar3 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CEnvScreenOverlay)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0x494) = iVar5;
  }
  fVar1 = *(float *)(gpGlobals + 0xc);
  if (fVar1 != *(float *)(this + 0x490)) {
    if (this[0x6c] == (CEnvScreenOverlay)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
      *(float *)(this + 0x490) = fVar1;
    }
    else {
      this[0x70] = (CEnvScreenOverlay)((byte)this[0x70] | 1);
      *(float *)(this + 0x490) = fVar1;
    }
    return;
  }
  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)