summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/g_cmds.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index a5e9cc3a..3451eadb 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1826,7 +1826,8 @@ void Cmd_Sell_f( gentity_t *ent )
continue;
}
- if( BG_InventoryContainsWeapon( i, ent->client->ps.stats ) && i != WP_BLASTER )
+ if( BG_InventoryContainsWeapon( i, ent->client->ps.stats ) &&
+ BG_FindPurchasableForWeapon( i ) )
{
BG_RemoveWeaponFromInventory( i, ent->client->ps.stats );
@@ -1848,7 +1849,8 @@ void Cmd_Sell_f( gentity_t *ent )
for( i = UP_NONE + 1; i < UP_NUM_UPGRADES; i++ )
{
//remove upgrade if carried
- if( BG_InventoryContainsUpgrade( i, ent->client->ps.stats ) )
+ if( BG_InventoryContainsUpgrade( i, ent->client->ps.stats ) &&
+ BG_FindPurchasableForUpgrade( i ) )
{
BG_RemoveUpgradeFromInventory( i, ent->client->ps.stats );