L L4D2node

TerrorAward::GetGuiSoundFromType

0x004e7b60 · 179 bytes · __cdecl

_ZN11TerrorAward19GetGuiSoundFromTypeE9AwardType

Decompiled

undefined (1 param)

/* TerrorAward::GetGuiSoundFromType(AwardType) */

undefined1 * TerrorAward::GetGuiSoundFromType(uint param_1)

{
  char cVar1;
  
  if (param_1 < 6) {
    V_strncpy(GetGuiSoundFromType(AwardType)::sound,"AwardEarned.Escaped",0x20);
    return GetGuiSoundFromType(AwardType)::sound;
  }
  if (param_1 - 0x19 < 0x7c) {
    cVar1 = CSWTCH_787[param_1 + 0x87];
    if (cVar1 == '\x01') {
      V_strncpy(GetGuiSoundFromType(AwardType)::sound,"AwardEarned.Honor",0x20);
      return GetGuiSoundFromType(AwardType)::sound;
    }
    if (cVar1 != '\0') {
      if (cVar1 == '\x02') {
        V_strncpy(GetGuiSoundFromType(AwardType)::sound,"AwardEarned.Fault",0x20);
      }
      return GetGuiSoundFromType(AwardType)::sound;
    }
  }
  V_strncpy(GetGuiSoundFromType(AwardType)::sound,"AwardEarned.Achievement",0x20);
  return GetGuiSoundFromType(AwardType)::sound;
}

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)