diff --git a/Tactical/DisplayCover.cpp b/Tactical/DisplayCover.cpp index 56251237..eb112894 100644 --- a/Tactical/DisplayCover.cpp +++ b/Tactical/DisplayCover.cpp @@ -530,11 +530,29 @@ void CalculateCover() CalculateCoverForSoldier( pSoldier, sGridNo, ubZ, bCover ); fInverseColor = FALSE; } - else if ( gubDrawMode == COVER_DRAW_MERC_VIEW ) // single view from your merc + else if ( gubDrawMode == COVER_DRAW_MERC_VIEW ) { // reset cover value bCover = MAX_COVER; - CalculateCoverFromSoldier( pSoldier, sGridNo, ubZ, bCover ); + if ( gTacticalStatus.fAtLeastOneGuyOnMultiSelect ) // view of selected mercs + { + // OK, loop through all guys who are 'multi-selected' and + INT32 cnt; + cnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID; + for ( pSoldier = MercPtrs[ cnt ]; cnt <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; cnt++, pSoldier++ ) + { + if ( pSoldier->bActive && pSoldier->bInSector ) + { + if ( pSoldier->flags.uiStatusFlags & SOLDIER_MULTI_SELECTED ) + { + CalculateCoverFromSoldier( pSoldier, sGridNo, ubZ, bCover ); + } + } + } + } + else // single view from your merc + CalculateCoverFromSoldier( pSoldier, sGridNo, ubZ, bCover ); + fInverseColor = TRUE; // we don't want to show the cover for the enemy } } diff --git a/Tactical/Handle UI.cpp b/Tactical/Handle UI.cpp index 4b7bfece..ea0c80ed 100644 --- a/Tactical/Handle UI.cpp +++ b/Tactical/Handle UI.cpp @@ -2106,7 +2106,7 @@ UINT32 UIHandleCMoveMerc( UI_EVENT *pUIEvent ) //StartLooseCursor( sMapPos, 0 ); } - if ( gTacticalStatus.fAtLeastOneGuyOnMultiSelect && pIntTile == NULL ) + if ( gTacticalStatus.fAtLeastOneGuyOnMultiSelect && pIntTile == NULL && !( gTacticalStatus.uiFlags & INCOMBAT ) ) { HandleMultiSelectionMove( sDestGridNo ); } @@ -5153,7 +5153,7 @@ UINT32 UIHandleLCLook( UI_EVENT *pUIEvent ) return( GAME_SCREEN ); } - if ( gTacticalStatus.fAtLeastOneGuyOnMultiSelect ) + if ( gTacticalStatus.fAtLeastOneGuyOnMultiSelect && !( gTacticalStatus.uiFlags & INCOMBAT ) ) { // OK, loop through all guys who are 'multi-selected' and cnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID; @@ -5464,7 +5464,7 @@ void EndMultiSoldierSelection( BOOLEAN fAcknowledge ) // OK, loop through all guys who are 'multi-selected' and - // check if our currently selected guy is amoung the + // check if our currently selected guy is among the // lucky few.. if not, change to a guy who is... cnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID; for ( pSoldier = MercPtrs[ cnt ]; cnt <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; cnt++, pSoldier++ ) @@ -5507,7 +5507,7 @@ void EndMultiSoldierSelection( BOOLEAN fAcknowledge ) void StopRubberBandedMercFromMoving( ) { - if ( !gTacticalStatus.fAtLeastOneGuyOnMultiSelect ) + if ( !gTacticalStatus.fAtLeastOneGuyOnMultiSelect || ( gTacticalStatus.uiFlags & INCOMBAT ) ) { return; } @@ -5515,7 +5515,7 @@ void StopRubberBandedMercFromMoving( ) INT32 cnt; // OK, loop through all guys who are 'multi-selected' and - // check if our currently selected guy is amoung the + // check if our currently selected guy is among the // lucky few.. if not, change to a guy who is... cnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID; for ( pSoldier = MercPtrs[ cnt ]; cnt <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; cnt++, pSoldier++ ) diff --git a/Tactical/Turn Based Input.cpp b/Tactical/Turn Based Input.cpp index 6a45c11a..28990dd6 100644 --- a/Tactical/Turn Based Input.cpp +++ b/Tactical/Turn Based Input.cpp @@ -4346,8 +4346,9 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) #endif // ATE: This key will select everybody in the sector - if (! (gTacticalStatus.uiFlags & INCOMBAT) ) - { + // Buggler: Disabled check for all merc display cover in turnbased mode + //if ( !(gTacticalStatus.uiFlags & INCOMBAT) ) + //{ SOLDIERTYPE * pSoldier; INT32 cnt; @@ -4362,7 +4363,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) } } EndMultiSoldierSelection( TRUE ); - } + //} } break; @@ -6186,7 +6187,7 @@ void HandleStanceChangeFromUIKeys( UINT8 ubAnimHeight ) SOLDIERTYPE * pSoldier; INT32 cnt; - if ( gTacticalStatus.fAtLeastOneGuyOnMultiSelect ) + if ( gTacticalStatus.fAtLeastOneGuyOnMultiSelect && !( gTacticalStatus.uiFlags & INCOMBAT ) ) { // OK, loop through all guys who are 'multi-selected' and // check if our currently selected guy is amoung the @@ -6243,7 +6244,7 @@ void HandleStealthChangeFromUIKeys( ) SOLDIERTYPE * pSoldier; INT32 cnt; - if ( gTacticalStatus.fAtLeastOneGuyOnMultiSelect ) + if ( gTacticalStatus.fAtLeastOneGuyOnMultiSelect && !( gTacticalStatus.uiFlags & INCOMBAT ) ) { // OK, loop through all guys who are 'multi-selected' and // check if our currently selected guy is amoung the @@ -6287,7 +6288,7 @@ void TestCapture( ) gStrategicStatus.uiFlags &= (~STRATEGIC_PLAYER_CAPTURED_FOR_RESCUE ); - // loop through sodliers and pick 3 lucky ones.... + // loop through soldiers and pick 3 lucky ones.... for ( cnt = gTacticalStatus.Team[gbPlayerNum].bFirstID, pSoldier=MercPtrs[cnt]; cnt <= gTacticalStatus.Team[gbPlayerNum].bLastID; cnt++, pSoldier++ ) { if ( pSoldier->stats.bLife >= OKLIFE && pSoldier->bActive && pSoldier->bInSector )