L L4D2node

CTerrorWeapon::TranslateViewmodelActivity

0x0056c1e0 · 163 bytes · __thiscall

_ZNK13CTerrorWeapon26TranslateViewmodelActivityE8Activity

Decompiled

undefined (2 params)

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

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

{
  int iVar1;
  
  if (param_2 == 0x338) {
    return 0x339;
  }
  if (param_2 < 0x339) {
    iVar1 = 0x54a;
    if (param_2 != 0xbf) {
      if (param_2 < 0xc0) {
        if (param_2 != 0xb3) {
          return param_2;
        }
        return 0x4fc;
      }
      if (param_2 != 0x334) {
        if (param_2 != 0x336) {
          return param_2;
        }
        return 0x337;
      }
      return 0x335;
    }
  }
  else {
    if (param_2 == 0x33e) {
      return 0x33f;
    }
    if (param_2 < 0x33f) {
      iVar1 = 0x33b;
      if ((param_2 != 0x33a) && (iVar1 = 0x33d, param_2 != 0x33c)) {
        return param_2;
      }
    }
    else {
      iVar1 = 0x3ad;
      if (param_2 != 0x3ac) {
        if (param_2 != 0x4e2) {
          return param_2;
        }
        return 0x4e6;
      }
    }
  }
  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)