L L4D2node

CAnimationLayer::Init

0x005eb930 · 556 bytes · __thiscall

_ZN15CAnimationLayer4InitEP21CBaseAnimatingOverlay

Decompiled

undefined (2 params)

/* CAnimationLayer::Init(CBaseAnimatingOverlay*) */

void __thiscall CAnimationLayer::Init(CAnimationLayer *this,CBaseAnimatingOverlay *param_1)

{
  undefined4 uVar1;
  CBaseEdict *pCVar2;
  int iVar3;
  int iVar4;
  
  *(undefined4 *)this = 0;
  iVar4 = gpGlobals;
  *(CBaseAnimatingOverlay **)(this + 0x48) = param_1;
  this[4] = (CAnimationLayer)0x0;
  *(undefined4 *)(this + 0x34) = 0xffffffff;
  *(undefined4 *)(this + 0x38) = 0;
  *(undefined4 *)(this + 0x24) = 0x42c80000;
  *(undefined4 *)(this + 0x28) = 0;
  *(undefined4 *)(this + 0x18) = 0x3f800000;
  uVar1 = *(undefined4 *)(iVar4 + 0xc);
  *(undefined4 *)(this + 0x2c) = 0;
  *(undefined4 *)(this + 0x30) = 0;
  *(undefined4 *)(this + 0x44) = uVar1;
  if (param_1 == (CBaseAnimatingOverlay *)0x0) {
    *(undefined4 *)(this + 8) = 0;
LAB_005ebb67:
    *(undefined4 *)(this + 0xc) = 0;
  }
  else {
    if (param_1[0x6c] == (CBaseAnimatingOverlay)0x0) {
      pCVar2 = *(CBaseEdict **)(param_1 + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar4 + 2) = 0;
        iVar4 = gpGlobals;
      }
    }
    else {
      param_1[0x70] = (CBaseAnimatingOverlay)((byte)param_1[0x70] | 1);
    }
    uVar1 = *(undefined4 *)(iVar4 + 0xc);
    *(undefined4 *)(param_1 + 0x78) = 0;
    *(undefined4 *)(param_1 + 0x74) = uVar1;
    iVar3 = *(int *)(this + 0x48);
    *(undefined4 *)(this + 8) = 0;
    if (iVar3 == 0) goto LAB_005ebb67;
    if (*(char *)(iVar3 + 0x6c) == '\0') {
      pCVar2 = *(CBaseEdict **)(iVar3 + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar4 + 2) = 0;
        iVar4 = gpGlobals;
      }
    }
    else {
      *(byte *)(iVar3 + 0x70) = *(byte *)(iVar3 + 0x70) | 1;
    }
    uVar1 = *(undefined4 *)(iVar4 + 0xc);
    *(undefined4 *)(iVar3 + 0x78) = 0;
    *(undefined4 *)(iVar3 + 0x74) = uVar1;
    iVar3 = *(int *)(this + 0x48);
    *(undefined4 *)(this + 0xc) = 0;
    if (iVar3 != 0) {
      if (*(char *)(iVar3 + 0x6c) == '\0') {
        pCVar2 = *(CBaseEdict **)(iVar3 + 0x30);
        if (pCVar2 != (CBaseEdict *)0x0) {
          *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
          *(undefined2 *)(iVar4 + 2) = 0;
          iVar4 = gpGlobals;
        }
      }
      else {
        *(byte *)(iVar3 + 0x70) = *(byte *)(iVar3 + 0x70) | 1;
      }
      uVar1 = *(undefined4 *)(iVar4 + 0xc);
      *(undefined4 *)(iVar3 + 0x78) = 0;
      *(undefined4 *)(iVar3 + 0x74) = uVar1;
      iVar3 = *(int *)(this + 0x48);
      *(undefined4 *)(this + 0x10) = 0;
      if (iVar3 != 0) {
        if (*(char *)(iVar3 + 0x6c) == '\0') {
          pCVar2 = *(CBaseEdict **)(iVar3 + 0x30);
          if (pCVar2 != (CBaseEdict *)0x0) {
            *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
            iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
            *(undefined2 *)(iVar4 + 2) = 0;
            iVar4 = gpGlobals;
          }
        }
        else {
          *(byte *)(iVar3 + 0x70) = *(byte *)(iVar3 + 0x70) | 1;
        }
        uVar1 = *(undefined4 *)(iVar4 + 0xc);
        *(undefined4 *)(iVar3 + 0x78) = 0;
        *(undefined4 *)(iVar3 + 0x74) = uVar1;
        iVar3 = *(int *)(this + 0x48);
        *(undefined4 *)(this + 0x14) = 0;
        if (iVar3 != 0) {
          if (*(char *)(iVar3 + 0x6c) == '\0') {
            pCVar2 = *(CBaseEdict **)(iVar3 + 0x30);
            if (pCVar2 != (CBaseEdict *)0x0) {
              *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
              *(undefined2 *)(iVar4 + 2) = 0;
              iVar4 = gpGlobals;
            }
          }
          else {
            *(byte *)(iVar3 + 0x70) = *(byte *)(iVar3 + 0x70) | 1;
          }
          uVar1 = *(undefined4 *)(iVar4 + 0xc);
          *(undefined4 *)(iVar3 + 0x78) = 0;
          *(undefined4 *)(iVar3 + 0x74) = uVar1;
        }
        *(undefined4 *)(this + 0x3c) = 0xf;
        return;
      }
      goto LAB_005ebb75;
    }
  }
  *(undefined4 *)(this + 0x10) = 0;
LAB_005ebb75:
  *(undefined4 *)(this + 0x14) = 0;
  *(undefined4 *)(this + 0x3c) = 0xf;
  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)