diff --git a/data/cdata/scripts/mp_patches/custom_weapons.gsc b/data/cdata/scripts/mp_patches/custom_weapons.gsc index 4122e199..e69ece94 100644 --- a/data/cdata/scripts/mp_patches/custom_weapons.gsc +++ b/data/cdata/scripts/mp_patches/custom_weapons.gsc @@ -21,6 +21,11 @@ find_in_table(csv, weap) return false; } +get_attachment_name(attachment) +{ + return tablelookup("mp/attachkits.csv", 1, attachment, 2); +} + is_custom_weapon(weap) { return find_in_table("mp/customweapons.csv", weap); @@ -197,11 +202,15 @@ buildweaponname(var_0, var_1, var_2, var_3, var_4, var_5) } } - if (issubstr(var_0, "h2_")) + if (!issubstr(var_0, "h1_")) { if (var_9) { - var_7 += "_" + var_1; + name = get_attachment_name(var_1); + if (isdefined(name) && name != "") + { + var_7 += "_" + name; + } } } else if (var_9 || var_10) diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index 44a936d6..ccd5d9a4 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -47,7 +47,7 @@ namespace game WEAK symbol Com_SetSlowMotion{0x0, 0x17E5F0}; WEAK symbol Com_Error{0x384820, 0x159860}; WEAK symbol Com_Quit_f{0x0, 0x1F9280}; - WEAK symbol Com_Shutdown{0x3A6A50, 0x0}; + WEAK symbol Com_Shutdown{0x3A6A50, 0x157E10}; WEAK symbol Com_IsAddonMap{0x40AED0, 0x17C100}; WEAK symbol Com_sprintf{0x429200, 0x5AF0F0};