L L4D2node

CBaseAnimatingOverlay::OnRestore

0x005ee9d0 · 325 bytes · __thiscall

_ZN21CBaseAnimatingOverlay9OnRestoreEv

Decompiled

undefined (1 param)

/* CBaseAnimatingOverlay::OnRestore() */

void __thiscall CBaseAnimatingOverlay::OnRestore(CBaseAnimatingOverlay *this)

{
  undefined4 uVar1;
  CBaseEdict *this_00;
  char cVar2;
  int iVar3;
  int iVar4;
  int *piVar5;
  byte *pbVar6;
  int iVar7;
  int iVar8;
  
  iVar8 = 0;
  iVar7 = 0;
  if (0 < *(int *)(this + 0x1400)) {
    do {
      *(CBaseAnimatingOverlay **)(*(int *)(this + 0x13f4) + 0x48 + iVar7) = this;
      pbVar6 = (byte *)(*(int *)(this + 0x13f4) + iVar7);
      if (((*pbVar6 & 1) == 0) && (*(int *)(pbVar6 + 0x3c) != 0xf)) {
        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;
        }
        pbVar6[0x3c] = 0xf;
        pbVar6[0x3d] = 0;
        pbVar6[0x3e] = 0;
        pbVar6[0x3f] = 0;
      }
      iVar8 = iVar8 + 1;
      iVar7 = iVar7 + 0x4c;
    } while (iVar8 < *(int *)(this + 0x1400));
    if (0 < *(int *)(this + 0x1400)) {
      iVar8 = 0;
      iVar7 = 0;
      do {
        if ((*(uint *)(*(int *)(this + 0x13f4) + iVar8) & 9) == 9) {
LAB_005eeabb:
          FastRemoveLayer(this,iVar7);
        }
        else {
          piVar5 = *(int **)(this + 0x13e0);
          if (piVar5 == (int *)0x0) {
            iVar4 = CBaseEntity::GetModel((CBaseEntity *)this);
            if (iVar4 == 0) {
              piVar5 = *(int **)(this + 0x13e0);
            }
            else {
              CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
              piVar5 = *(int **)(this + 0x13e0);
            }
            if (piVar5 != (int *)0x0) goto LAB_005eea9b;
          }
          else {
LAB_005eea9b:
            if ((*piVar5 != 0) &&
               (cVar2 = CBaseAnimating::IsValidSequence
                                  ((CBaseAnimating *)this,
                                   *(int *)(*(int *)(this + 0x13f4) + 8 + iVar8)), cVar2 == '\0'))
            goto LAB_005eeabb;
          }
        }
        iVar7 = iVar7 + 1;
        iVar8 = iVar8 + 0x4c;
      } while (iVar7 < *(int *)(this + 0x1400));
    }
  }
  CBaseAnimating::OnRestore((CBaseAnimating *)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)