Small fix

This commit is contained in:
fed 2023-01-28 02:32:34 +01:00
parent e54e17d6b0
commit 7c20dce660
2 changed files with 12 additions and 3 deletions

View File

@ -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)

View File

@ -47,7 +47,7 @@ namespace game
WEAK symbol<void(float, float, int)> Com_SetSlowMotion{0x0, 0x17E5F0};
WEAK symbol<void(errorParm code, const char* message, ...)> Com_Error{0x384820, 0x159860};
WEAK symbol<void()> Com_Quit_f{0x0, 0x1F9280};
WEAK symbol<void(char const* finalMessage)> Com_Shutdown{0x3A6A50, 0x0};
WEAK symbol<void(char const* finalMessage)> Com_Shutdown{0x3A6A50, 0x157E10};
WEAK symbol<bool(const char* mapname, const char** base_mapname)> Com_IsAddonMap{0x40AED0, 0x17C100};
WEAK symbol<int(char* dest, int size, const char* fmt, ...)> Com_sprintf{0x429200, 0x5AF0F0};