From 2c9317c9060ca4712cf9b3b9381e1610b9ca24e1 Mon Sep 17 00:00:00 2001 From: avolkov Date: Mon, 26 Dec 2005 11:37:24 +0000 Subject: [PATCH] Fixes problem with Melnorme stripping Chmmr bomb modules from the ship in a fuel deal; bug #803 git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2120 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/comm/melnorm/melnorm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sc2/src/sc2code/comm/melnorm/melnorm.c b/sc2/src/sc2code/comm/melnorm/melnorm.c index 8b39e41cf..3601f369b 100644 --- a/sc2/src/sc2code/comm/melnorm/melnorm.c +++ b/sc2/src/sc2code/comm/melnorm/melnorm.c @@ -221,10 +221,9 @@ ShipWorth (void) which_module = GLOBAL_SIS (ModuleSlots[i]); if (which_module < BOMB_MODULE_0 - || which_module != CREW_POD - || ++crew_pods > 0) + && (which_module != CREW_POD || ++crew_pods > 0)) { - worth += GLOBAL (ModuleCost[i]); + worth += GLOBAL (ModuleCost[which_module]); } } @@ -363,7 +362,8 @@ StripShip (COUNT fuel_required) break; case CREW_POD: i = HIBYTE (LOWORD (rand_val)) % NUM_MODULE_SLOTS; - if ((which_module = SIS_copy.ModuleSlots[i]) >= EMPTY_SLOT + which_module = SIS_copy.ModuleSlots[i]; + if (which_module >= BOMB_MODULE_0 || which_module == FUEL_TANK || which_module == HIGHEFF_FUELSYS || (which_module == STORAGE_BAY