L L4D2node

CGrenadeLauncher::CalcViewmodelLayerActivity

0x0053a050 · 176 bytes · __thiscall

_ZNK16CGrenadeLauncher26CalcViewmodelLayerActivityE8Activity

Decompiled

undefined (2 params)

/* CGrenadeLauncher::CalcViewmodelLayerActivity(Activity) const */

int __thiscall CGrenadeLauncher::CalcViewmodelLayerActivity(undefined4 this,int param_2)

{
  int iVar1;
  
  if (param_2 == 0x336) {
    return 0x337;
  }
  if (param_2 < 0x337) {
    if (param_2 == 0xc1) {
      return 0x4f0;
    }
    if (param_2 < 0xc2) {
      iVar1 = 0x4fc;
      if (param_2 != 0xb3) {
        if (param_2 != 0xbf) {
          return param_2;
        }
        return 0x4e4;
      }
    }
    else {
      iVar1 = 0x4e7;
      if ((param_2 != 0xd9) && (iVar1 = 0x335, param_2 != 0x334)) {
        return param_2;
      }
    }
  }
  else {
    if (param_2 == 0x33c) {
      return 0x33d;
    }
    if (param_2 < 0x33d) {
      iVar1 = 0x339;
      if (param_2 != 0x338) {
        if (param_2 != 0x33a) {
          return param_2;
        }
        return 0x33b;
      }
    }
    else {
      iVar1 = 0x33f;
      if ((param_2 != 0x33e) && (iVar1 = 0x4e6, param_2 != 0x4e2)) {
        return param_2;
      }
    }
  }
  return iVar1;
}

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)