From 843544049f06b2b60bbf4e0f6964aa7a36924ffd Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Wed, 31 Aug 2005 23:48:35 +0000 Subject: * Fixed "sell upgrades" so it doesn't sell the medkit --- src/game/g_cmds.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/game') 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 ); -- cgit