mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Enhancements (by Buggler)
- Allows all mercs cover display view by using hotkey '='; multi-selected mercs view only possible in realtime mode git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6551 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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++ )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user