L L4D2node

CBaseAnimatingOverlay::SetLayerCycle

0x005ecae0 · 213 bytes · __thiscall

_ZN21CBaseAnimatingOverlay13SetLayerCycleEif

Decompiled

undefined (3 params)

/* CBaseAnimatingOverlay::SetLayerCycle(int, float) */

void __thiscall
CBaseAnimatingOverlay::SetLayerCycle(CBaseAnimatingOverlay *this,int param_1,float param_2)

{
  undefined4 uVar1;
  int iVar2;
  CBaseEdict *this_00;
  int iVar3;
  byte *pbVar4;
  
  if ((-1 < param_1) && (param_1 < *(int *)(this + 0x1400))) {
    pbVar4 = (byte *)(*(int *)(this + 0x13f4) + param_1 * 0x4c);
    if ((*pbVar4 & 1) != 0) {
      if (pbVar4[5] == 0) {
        if (param_2 <= 0.0) {
          param_2 = 0.0;
        }
        if (1.0 <= param_2) {
          param_2 = 1.0;
        }
      }
      iVar3 = gpGlobals;
      if (param_2 != *(float *)(pbVar4 + 0xc)) {
        iVar2 = *(int *)(pbVar4 + 0x48);
        if (iVar2 != 0) {
          if (*(char *)(iVar2 + 0x6c) == '\0') {
            this_00 = *(CBaseEdict **)(iVar2 + 0x30);
            if (this_00 != (CBaseEdict *)0x0) {
              *(uint *)this_00 = *(uint *)this_00 | 0x101;
              iVar3 = CBaseEdict::GetChangeAccessor(this_00);
              *(undefined2 *)(iVar3 + 2) = 0;
            }
          }
          else {
            *(byte *)(iVar2 + 0x70) = *(byte *)(iVar2 + 0x70) | 1;
          }
          iVar3 = gpGlobals;
          uVar1 = *(undefined4 *)(gpGlobals + 0xc);
          *(undefined4 *)(iVar2 + 0x78) = 0;
          *(undefined4 *)(iVar2 + 0x74) = uVar1;
        }
        *(float *)(pbVar4 + 0xc) = param_2;
        pbVar4 = (byte *)(param_1 * 0x4c + *(int *)(this + 0x13f4));
      }
      *(undefined4 *)(pbVar4 + 0x44) = *(undefined4 *)(iVar3 + 0xc);
    }
  }
  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)