From d3100e3c4e1ee1dad3d70b1ac5eb83e4f7345aeb Mon Sep 17 00:00:00 2001 From: Wanne Date: Wed, 3 Sep 2014 16:29:19 +0000 Subject: [PATCH] Merged from revision: 7484 Fixes (by Buggler) - Commented code due to weird results when swapping filled LBE items that has pockets of the same size - Fixed militia remains in loaded sector on using Unassign All button and then not assigning any militia to the loaded sector git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7485 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Map Screen Interface Map.cpp | 5 +++++ Tactical/Items.cpp | 7 ++++--- Tactical/Soldier Control.cpp | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Strategic/Map Screen Interface Map.cpp b/Strategic/Map Screen Interface Map.cpp index 27ea4fe5..9869d5fc 100644 --- a/Strategic/Map Screen Interface Map.cpp +++ b/Strategic/Map Screen Interface Map.cpp @@ -5500,6 +5500,11 @@ void HandleRemovalOfAllTroopsAmongstSectors( void ) SectorInfo[ sCurrentSectorValue ].ubNumberOfCivsAtLevel[ GREEN_MILITIA ] = 0; SectorInfo[ sCurrentSectorValue ].ubNumberOfCivsAtLevel[ REGULAR_MILITIA ] = 0; SectorInfo[ sCurrentSectorValue ].ubNumberOfCivsAtLevel[ ELITE_MILITIA ] = 0; + + if( sSectorX == gWorldSectorX && sSectorY == gWorldSectorY ) + { + gfStrategicMilitiaChangesMade = TRUE; + } } } diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index d0b00b28..714edaa3 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -6613,13 +6613,14 @@ BOOLEAN PlaceObject( SOLDIERTYPE * pSoldier, INT8 bPos, OBJECTTYPE * pObj ) else if (IsSlotAnLBESlot(bPos) == true && Item[pObj->usItem].usItemClass == IC_LBEGEAR) { - /*CHRISL: If we're trying to swap LBE items between IC pockets, we have to be careful that items are moved - into active pockets or that an LBENODE is properly created.*/ + /* Buggler: Code commented due to weird results when swapping filled LBE items that has pockets of the same size + //CHRISL: If we're trying to swap LBE items between IC pockets, we have to be careful that items are moved + into active pockets or that an LBENODE is properly created. if(pObj->HasAnyActiveLBEs(pSoldier) == false && !(_KeyDown(SHIFT))){ std::vector LBESlots; GetLBESlots(bPos, LBESlots); MoveItemsToActivePockets(pSoldier, LBESlots, bPos, pObj); - } + }*/ pInSlot->MoveThisObjectTo(gTempObject, -1, pSoldier, bPos); pObj->MoveThisObjectTo(*pInSlot, -1, pSoldier, bPos); //CHRISL: We need to make sure there are no items left in pObj or we'll lose them diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index f7548021..681e9928 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -15231,7 +15231,7 @@ BOOLEAN SOLDIERTYPE::LooksLikeACivilian( void ) checkslot = VESTPOCKPOS; break; case 4: - if ( bLoop == 23 || bLoop == 35 || bLoop == 36 || bLoop == 37 || bLoop == 38 ) + if ( bLoop == MEDPOCK3POS || bLoop == SMALLPOCK11POS || bLoop == SMALLPOCK12POS || bLoop == SMALLPOCK13POS || bLoop == SMALLPOCK14POS ) checkslot = LTHIGHPOCKPOS; else checkslot = RTHIGHPOCKPOS; @@ -15410,7 +15410,7 @@ BOOLEAN SOLDIERTYPE::EquipmentTooGood( BOOLEAN fCloselook ) checkslot = VESTPOCKPOS; break; case 4: - if ( bLoop == 23 || bLoop == 35 || bLoop == 36 || bLoop == 37 || bLoop == 38 ) + if ( bLoop == MEDPOCK3POS || bLoop == SMALLPOCK11POS || bLoop == SMALLPOCK12POS || bLoop == SMALLPOCK13POS || bLoop == SMALLPOCK14POS ) checkslot = LTHIGHPOCKPOS; else checkslot = RTHIGHPOCKPOS;