L L4D2node

CBaseAnimatingOverlay::GetLayerWeight

0x005eced0 · 66 bytes · __thiscall

_ZN21CBaseAnimatingOverlay14GetLayerWeightEi

Decompiled

undefined (2 params)

/* CBaseAnimatingOverlay::GetLayerWeight(int) */

longdouble __thiscall CBaseAnimatingOverlay::GetLayerWeight(CBaseAnimatingOverlay *this,int param_1)

{
  byte *pbVar1;
  float fVar2;
  
  fVar2 = 0.0;
  if (((-1 < param_1) && (param_1 < *(int *)(this + 0x1400))) &&
     (pbVar1 = (byte *)(param_1 * 0x4c + *(int *)(this + 0x13f4)), (*pbVar1 & 1) != 0)) {
    fVar2 = *(float *)(pbVar1 + 0x14);
  }
  return (longdouble)fVar2;
}

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)