Fix AI deadlock when multiple soldiers occupy the same tile

Fix to reset Pablo so that future thefts can also be punished


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1169 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Overhaul
2007-08-07 05:10:05 +00:00
parent f5e3e7d7ff
commit 6de05c3fe1
9 changed files with 1702 additions and 1691 deletions
+4 -2
View File
@@ -252,8 +252,10 @@ void HandleStructChangeFromGridNo( SOLDIERTYPE *pSoldier, INT16 sGridNo )
{
if ( sGridNo == BOBBYR_SHIPPING_DEST_GRIDNO && gWorldSectorX == BOBBYR_SHIPPING_DEST_SECTOR_X && gWorldSectorY == BOBBYR_SHIPPING_DEST_SECTOR_Y && gbWorldSectorZ == BOBBYR_SHIPPING_DEST_SECTOR_Z && CheckFact( FACT_PABLOS_STOLE_FROM_LATEST_SHIPMENT, 0 ) && !(CheckFact( FACT_PLAYER_FOUND_ITEMS_MISSING, 0) ) )
{
SayQuoteFromNearbyMercInSector( BOBBYR_SHIPPING_DEST_GRIDNO, 3, QUOTE_STUFF_MISSING_DRASSEN );
fDidMissingQuote = TRUE;
SetFactFalse( 38); // Reset whether we punched Pablo lately
SetFactFalse( FACT_PABLO_RETURNED_GOODS);
SayQuoteFromNearbyMercInSector( BOBBYR_SHIPPING_DEST_GRIDNO, 3, QUOTE_STUFF_MISSING_DRASSEN );
fDidMissingQuote = TRUE;
}
}
else if ( pSoldier->bTeam == CIV_TEAM )
+5 -1
View File
@@ -2263,7 +2263,11 @@ BOOLEAN OKToAddMercToWorld( SOLDIERTYPE *pSoldier, INT8 bDirection )
STRUCTURE_FILE_REF *pStructFileRef;
UINT16 usOKToAddStructID;
//if ( pSoldier->uiStatusFlags & SOLDIER_MULTITILE )
// 0verhaul: Reinserting this check. If a soldier is sitting or standing on a grid and another soldier is lying prone
// across that grid but has the structure, this call will not allow the current soldier to turn. Since we are talking
// about the soldier whose turn it is, this is not a good thing because it will lead to deadlock.
if ( pSoldier->uiStatusFlags & SOLDIER_MULTITILE ||
pSoldier->usAnimState == CRAWLING)
{
// Get surface data
usAnimSurface = GetSoldierAnimationSurface( pSoldier, pSoldier->usAnimState );