Fixed update of items for which auto/burst does not apply when swapped into the hand

Moved helicopter in Estoni so that it is unblocked by a weed and can therefore appear completely
Fixed conditions where the game should remain paused but doesn't, and where it should unpause but doesn't


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1531 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Overhaul
2007-10-20 07:13:44 +00:00
parent e879d3103c
commit eeb82168b5
6 changed files with 25 additions and 15 deletions
+6 -4
View File
@@ -5491,7 +5491,7 @@ void MakeSureToolKitIsInHand( SOLDIERTYPE *pSoldier )
{
if( Item[pSoldier -> inv[ bPocket ].usItem].toolkit )
{
SwapObjs( &pSoldier -> inv[ HANDPOS ], &pSoldier -> inv[ bPocket ] );
SwapObjs( pSoldier, HANDPOS, bPocket );
break;
}
}
@@ -5519,7 +5519,7 @@ BOOLEAN MakeSureMedKitIsInHand( SOLDIERTYPE *pSoldier )
if ( Item[pSoldier -> inv[ bPocket ].usItem].medicalkit )
{
fCharacterInfoPanelDirty = TRUE;
SwapObjs( &pSoldier -> inv[ HANDPOS ], &pSoldier -> inv[ bPocket ] );
SwapObjs( pSoldier, HANDPOS, bPocket );
return(TRUE);
}
}
@@ -5539,14 +5539,14 @@ BOOLEAN MakeSureMedKitIsInHand( SOLDIERTYPE *pSoldier )
if( ( Item[ pSoldier -> inv[ HANDPOS ].usItem ].twohanded ) && ( bPocket >= SMALLPOCK1POS ) )
{
// first move from hand to second hand
SwapObjs( &pSoldier -> inv[ HANDPOS ], &pSoldier -> inv[ SECONDHANDPOS ] );
SwapObjs( pSoldier, HANDPOS, SECONDHANDPOS );
// dirty mapscreen and squad panels
fCharacterInfoPanelDirty = TRUE;
fInterfacePanelDirty = DIRTYLEVEL2;
}
SwapObjs( &pSoldier -> inv[ HANDPOS ], &pSoldier -> inv[ bPocket ] );
SwapObjs( pSoldier, HANDPOS, bPocket );
return(TRUE);
@@ -7084,6 +7084,8 @@ void ContractMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
}
else
{
// The game should be unpaused when this message box disappears
UnPauseGame();
DoMapMessageBox( MSG_BOX_BASIC_STYLE, gzLateLocalizedString[ 48 ], MAP_SCREEN, MSG_BOX_FLAG_YESNO, MercDismissConfirmCallBack );
}
+3 -3
View File
@@ -4,9 +4,9 @@
#include "types.h"
//Macro to convert sector coordinates (1-16,1-16) to 0-255
#define SECTOR(x,y) ((y-1)*16+x-1)
#define SECTORX(SectorID) ((SectorID % 16) + 1)
#define SECTORY(SectorID) ((SectorID / 16) + 1)
#define SECTOR(x,y) (UINT8)((y-1)*16+x-1)
#define SECTORX(SectorID) (UINT8)((SectorID % 16) + 1)
#define SECTORY(SectorID) (UINT8)((SectorID / 16) + 1)
//Sector enumerations
//
+4 -1
View File
@@ -117,7 +117,7 @@ UINT8 ubRefuelList[ NUMBER_OF_REFUEL_SITES ][ 2 ] =
INT16 sRefuelStartGridNo[ NUMBER_OF_REFUEL_SITES ] ={
9001, // drassen
13068, // estoni
13067, // estoni
};
// whether or not helicopter can refuel at this site
@@ -1566,6 +1566,9 @@ void HandleHelicopterOnGroundGraphic( void )
{
gMercProfiles[ SKYRIDER ].sSectorX = gWorldSectorX;
gMercProfiles[ SKYRIDER ].sSectorY = gWorldSectorY;
gMercProfiles[ SKYRIDER ].ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
gMercProfiles[ SKYRIDER ].usStrategicInsertionData = sRefuelStartGridNo[ubSite] - 639; // Stand near the heli
gMercProfiles[ SKYRIDER ].fUseProfileInsertionInfo = TRUE;
}
}
else
+6 -2
View File
@@ -980,8 +980,12 @@ BOOLEAN StrategicRemoveMerc( SOLDIERTYPE *pSoldier )
wcsncpy( gMercProfiles[ pSoldier->ubProfile ].zName, L"", 1 );
}
// ATE: update team panels....
UpdateTeamPanelAssignments( );
// ATE: update team panels....
UpdateTeamPanelAssignments( );
// And unpause the @#$@#$ interface
UnLockPauseState();
UnPauseGame();
return( TRUE );
}
+1
View File
@@ -415,6 +415,7 @@ void ClearMapControlledFlags( void )
SectorInfo[ SECTOR( iCounterA, iCounterB ) ].fPlayer[ 0 ] = TRUE;
}
}
UpdateAirspaceControl( );
}
#endif
+5 -5
View File
@@ -4476,10 +4476,10 @@ BOOLEAN IsThisSectorASAMSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
return( FALSE );
}
for ( cnt = 0; cnt < NUMBER_OF_SAMS; cnt++ )
{
if( ( sSectorX == gpSamSectorX[cnt] ) && ( sSectorY == gpSamSectorY[cnt] ) )
return( TRUE );
for ( cnt = 0; cnt < NUMBER_OF_SAMS; cnt++ )
{
if( ( sSectorX == gpSamSectorX[cnt] ) && ( sSectorY == gpSamSectorY[cnt] ) )
return( TRUE );
}
return ( FALSE );
@@ -4871,7 +4871,7 @@ void AdjustSoldierPathToGoOffEdge( SOLDIERTYPE *pSoldier, INT16 sEndGridNo, UINT
for (iLoop = 0; iLoop < pSoldier->usPathDataSize; iLoop++)
{
sTempGridNo += (INT16)DirectionInc( pSoldier->usPathingData[ iLoop ] );
sTempGridNo += DirectionInc( (UINT8) pSoldier->usPathingData[ iLoop ] );
}
if (sTempGridNo == sEndGridNo)