From 7e37a074762f85cebc85981d28f13392c1ec3753 Mon Sep 17 00:00:00 2001 From: ChrisL Date: Tue, 12 Aug 2008 17:09:29 +0000 Subject: [PATCH] Fixed the sector inventory so that you can right click to look at an item's description even if you don't have an On Duty merc in the sector. You still need a merc in sector, but they can be involved in another activity where before they also had to be part of an active unit. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2306 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Map Screen Interface Map Inventory.cpp | 2 +- Tactical/Soldier macros.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Strategic/Map Screen Interface Map Inventory.cpp b/Strategic/Map Screen Interface Map Inventory.cpp index 42baf11b..fa385bd1 100644 --- a/Strategic/Map Screen Interface Map Inventory.cpp +++ b/Strategic/Map Screen Interface Map Inventory.cpp @@ -838,7 +838,7 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason ) bool fValidPointer = false; if ( !InSectorStackPopup( ) && !InItemStackPopup( ) && !InItemDescriptionBox( ) && !InKeyRingPopup( ) && twItem->object.exists() == true && (bSelectedInfoChar != -1 && gCharactersList[bSelectedInfoChar].fValid)) { - if(OK_CONTROLLABLE_MERC( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID] )) + if(OK_CONTROL_MERC( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID] )) { //CHRISL: The old setup had a flaw I didn't consider. if, for some reason, the ItemSlotLimit = 0 // nothing might happen. Now we setup a flag to determine if our cursor is value for the item we're diff --git a/Tactical/Soldier macros.h b/Tactical/Soldier macros.h index 8380c1b3..83791f9c 100644 --- a/Tactical/Soldier macros.h +++ b/Tactical/Soldier macros.h @@ -23,6 +23,9 @@ // Checks if our guy can be controllable .... checks bInSector, team, on duty, etc... #define OK_INSECTOR_MERC( p ) ( p->stats.bLife >= OKLIFE && p->bActive && p->bInSector && p->bTeam == gbPlayerNum && p->bAssignment < ON_DUTY ) +// Checks if our guy is controllable but doesn't care about current assignment +#define OK_CONTROL_MERC( p ) ( p->stats.bLife >= OKLIFE && p->bActive && p->bInSector && p->bTeam == gbPlayerNum ) + // Checkf if our guy can be selected and is not in a position where our team has an interupt and he does not have one... #define OK_INTERRUPT_MERC( p ) ( ( INTERRUPT_QUEUED != 0 ) ? ( ( p->aiData.bMoved ) ? FALSE : TRUE ) : TRUE )