L L4D2node

CBaseAnimatingOverlay::FastRemoveLayer

0x005ed1f0 · 241 bytes · __thiscall

_ZN21CBaseAnimatingOverlay15FastRemoveLayerEi

Decompiled

undefined (2 params)

/* CBaseAnimatingOverlay::FastRemoveLayer(int) */

void __thiscall CBaseAnimatingOverlay::FastRemoveLayer(CBaseAnimatingOverlay *this,int param_1)

{
  undefined4 uVar1;
  int iVar2;
  CBaseEdict *this_00;
  int iVar3;
  int iVar4;
  CAnimationLayer *this_01;
  int iVar5;
  byte *pbVar6;
  
  if ((-1 < param_1) && (param_1 < *(int *)(this + 0x1400))) {
    iVar4 = *(int *)(this + 0x13f4);
    this_01 = (CAnimationLayer *)(iVar4 + param_1 * 0x4c);
    if (((byte)*this_01 & 1) != 0) {
      if (0 < *(int *)(this + 0x1400)) {
        iVar5 = 0;
        do {
          pbVar6 = (byte *)(iVar5 * 0x4c + iVar4);
          if (((*pbVar6 & 1) != 0) &&
             (iVar2 = *(int *)(pbVar6 + 0x3c), *(int *)(this_01 + 0x3c) < iVar2)) {
            iVar4 = *(int *)(pbVar6 + 0x48);
            if (iVar4 != 0) {
              if (*(char *)(iVar4 + 0x6c) == '\0') {
                this_00 = *(CBaseEdict **)(iVar4 + 0x30);
                if (this_00 != (CBaseEdict *)0x0) {
                  *(uint *)this_00 = *(uint *)this_00 | 0x101;
                  iVar3 = CBaseEdict::GetChangeAccessor(this_00);
                  *(undefined2 *)(iVar3 + 2) = 0;
                }
              }
              else {
                *(byte *)(iVar4 + 0x70) = *(byte *)(iVar4 + 0x70) | 1;
              }
              uVar1 = *(undefined4 *)(gpGlobals + 0xc);
              *(undefined4 *)(iVar4 + 0x78) = 0;
              *(undefined4 *)(iVar4 + 0x74) = uVar1;
            }
            *(int *)(pbVar6 + 0x3c) = iVar2 + -1;
            iVar4 = *(int *)(this + 0x13f4);
            this_01 = (CAnimationLayer *)(param_1 * 0x4c + iVar4);
          }
          iVar5 = iVar5 + 1;
        } while (iVar5 < *(int *)(this + 0x1400));
      }
      CAnimationLayer::Init(this_01,this);
      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)