L L4D2node

CBaseAnimatingOverlay::SetLayerNoRestore

0x005ed020 · 58 bytes · __thiscall

_ZN21CBaseAnimatingOverlay17SetLayerNoRestoreEib

Decompiled

undefined (3 params)

/* CBaseAnimatingOverlay::SetLayerNoRestore(int, bool) */

void __thiscall
CBaseAnimatingOverlay::SetLayerNoRestore(CBaseAnimatingOverlay *this,int param_1,bool param_2)

{
  uint uVar1;
  uint *puVar2;
  
  if ((-1 < param_1) && (param_1 < *(int *)(this + 0x1400))) {
    puVar2 = (uint *)(param_1 * 0x4c + *(int *)(this + 0x13f4));
    uVar1 = *puVar2;
    if ((uVar1 & 1) != 0) {
      if (param_2) {
        *puVar2 = uVar1 | 8;
        return;
      }
      *puVar2 = uVar1 & 0xfffffff7;
    }
  }
  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)