L L4D2node

CSMG_MP5::TranslateViewmodelActivity

0x005590e0 · 210 bytes · __thiscall

_ZNK8CSMG_MP526TranslateViewmodelActivityE8Activity

Decompiled

undefined (2 params)

/* CSMG_MP5::TranslateViewmodelActivity(Activity) const */

undefined4 __thiscall CSMG_MP5::TranslateViewmodelActivity(undefined4 this,int param_2)

{
  undefined4 uVar1;
  
  if (param_2 == 0x338) {
    return 0x339;
  }
  if (param_2 < 0x339) {
    if (param_2 == 0xc1) {
      return 0x4f0;
    }
    if (param_2 < 0xc2) {
      if (param_2 == 0xb3) {
        return 0x4fc;
      }
      if (param_2 == 0xbf) {
        return 0x4e4;
      }
    }
    else {
      if (param_2 == 0x334) {
        return 0x335;
      }
      if (param_2 == 0x336) {
        return 0x337;
      }
    }
  }
  else {
    if (param_2 == 0x33e) {
      return 0x33f;
    }
    if (param_2 < 0x33f) {
      if (param_2 == 0x33a) {
        return 0x33b;
      }
      if (param_2 == 0x33c) {
        return 0x33d;
      }
    }
    else {
      if (param_2 == 0x4e2) {
        return 0x4e6;
      }
      if (param_2 == 0x4f1) {
        return 0x566;
      }
    }
  }
  uVar1 = CTerrorWeapon::TranslateViewmodelActivity();
  return uVar1;
}

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)