If 'GetItem' assignment isn't possible due to no valid items in target sector, indicate this to the player.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8386 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2017-02-01 19:05:58 +00:00
parent 48254ea5a5
commit 79ee1522f9
3 changed files with 70 additions and 8 deletions
+10 -8
View File
@@ -17090,9 +17090,8 @@ void ReEvaluateEveryonesNothingToDo()
INT32 iCounter = 0;
SOLDIERTYPE *pSoldier = NULL;
BOOLEAN fNothingToDo;
for( iCounter = 0; iCounter <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; iCounter++ )
for( iCounter = 0; iCounter <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; ++iCounter )
{
pSoldier = &Menptr[ iCounter ];
@@ -17172,7 +17171,13 @@ void ReEvaluateEveryonesNothingToDo()
break;
case MOVE_EQUIPMENT:
fNothingToDo = FALSE;
{
// which sector do we want to move stuff to?
INT16 targetX = SECTORX( pSoldier->usItemMoveSectorID );
INT16 targetY = SECTORY( pSoldier->usItemMoveSectorID );
fNothingToDo = (GetNumberOfMovableItems( targetX, targetY, 0 ) == 0);
}
break;
case FACILITY_STRATEGIC_MILITIA_MOVEMENT:
@@ -17218,15 +17223,12 @@ void ReEvaluateEveryonesNothingToDo()
{
pSoldier->usQuoteSaidExtFlags &= ~SOLDIER_QUOTE_SAID_DONE_ASSIGNMENT;
}
}
}
// re-evaluation completed
gfReEvaluateEveryonesNothingToDo = FALSE;
// redraw the map, in case we're showing teams, and someone just came on duty or off duty, their icon needs updating
fMapPanelDirty = TRUE;
}