summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2005-08-31 23:48:35 +0000
committerTim Angus <tim@ngus.net>2005-08-31 23:48:35 +0000
commit843544049f06b2b60bbf4e0f6964aa7a36924ffd (patch)
tree44f83dece50c98a8bef7a6507dce72b94fa42506 /src/game
parent7dcf5274bc4c6e80a644f0814520818a8cedcd40 (diff)
* Fixed "sell upgrades" so it doesn't sell the medkit
Diffstat (limited to 'src/game')
-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 );