Updated prefixes and re-added item_suit hack

This commit is contained in:
Saul Rennison 2013-07-02 16:43:37 +01:00
parent e78f6eabd5
commit 8844deeaad

View file

@ -803,8 +803,7 @@ struct ClassNamePrefix_t
// Add class name prefixes to show in the "give" command autocomplete here
static ClassNamePrefix_t s_pEntityPrefixes[] =
{
ClassNamePrefix_t("ammo_", true),
ClassNamePrefix_t("item_", true),
ClassNamePrefix_t("item_", false),
ClassNamePrefix_t("weapon_", false),
};
@ -915,6 +914,13 @@ CON_COMMAND_F_COMPLETION(give, "Give item to player. Syntax: <item name>", FCVAR
return;
}
// Dirty hack to avoid suit playing its pickup sound
if(FStrEq(pszClassName, "item_suit"))
{
pPlayer->EquipSuit(false);
return;
}
pPlayer->GiveNamedItem(pszClassName);
}