diff --git a/GameVersion.cpp b/GameVersion.cpp index 8e8f3dd65..cf198d5bd 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -23,7 +23,7 @@ wchar_t zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - wchar_t zVersionLabel[256] = { L"Release v1.13.861" }; + wchar_t zVersionLabel[256] = { L"Release v1.13.867" }; #endif diff --git a/JA2.suo b/JA2.suo index 94e507bfd..c8dbacc8d 100644 Binary files a/JA2.suo and b/JA2.suo differ diff --git a/JA2.vcproj b/JA2.vcproj index 30864f883..b3f2f0b43 100644 --- a/JA2.vcproj +++ b/JA2.vcproj @@ -546,7 +546,7 @@ ubSectorX, gpBattleGroup->ubSectorY ); } // debug only if ( gfDisplayPotentialRetreatPaths == TRUE ) { - Assert( gfPreBattleInterfaceActive ); +// Assert( gfPreBattleInterfaceActive ); } diff --git a/Strategic/mapscreen.cpp b/Strategic/mapscreen.cpp index 1f4e13dc1..ff74faf73 100644 --- a/Strategic/mapscreen.cpp +++ b/Strategic/mapscreen.cpp @@ -12322,11 +12322,10 @@ void HandleNewDestConfirmation( INT16 sMapX, INT16 sMapY ) // tell player the route was CONFIRMED // NOTE: We don't this this for the helicopter any more, since it clashes with Skyrider's own confirmation msg MapScreenMessage( FONT_MCOLOR_LTYELLOW, MSG_MAP_UI_POSITION_MIDDLE, pMapPlotStrings[ 1 ] ); + + // wake up anybody who needs to be awake to travel + WakeUpAnySleepingSelectedMercsOnFootOrDriving(); } - - - // wake up anybody who needs to be awake to travel - WakeUpAnySleepingSelectedMercsOnFootOrDriving(); } diff --git a/TacticalAI/FindLocations.cpp b/TacticalAI/FindLocations.cpp index 03d90f9d8..72523422f 100644 --- a/TacticalAI/FindLocations.cpp +++ b/TacticalAI/FindLocations.cpp @@ -554,6 +554,12 @@ INT16 FindBestNearbyCover(SOLDIERTYPE *pSoldier, INT32 morale, INT32 *piPercentB UINT8 ubLightPercentDifference; BOOLEAN fNight; + // There's no cover when boxing! + if (gTacticalStatus.bBoxingState == BOXING) + { + return (NOWHERE); + } + if ( gbWorldSectorZ > 0 ) { fNight = FALSE; @@ -1638,6 +1644,12 @@ INT8 SearchForItems( SOLDIERTYPE * pSoldier, INT8 bReason, UINT16 usItem ) iTempValue = -1; iItemIndex = iBestItemIndex = -1; + // No fair picking up weapons while boxing! + if (gTacticalStatus.bBoxingState == BOXING) + { + return AI_ACTION_NONE; + } + if (pSoldier->bActionPoints < AP_PICKUP_ITEM) { return( AI_ACTION_NONE ); diff --git a/TileEngine/tiledef.cpp b/TileEngine/tiledef.cpp index e18b6e196..95ed3f11e 100644 --- a/TileEngine/tiledef.cpp +++ b/TileEngine/tiledef.cpp @@ -982,6 +982,8 @@ UINT8 GetLandLevelDepth( UINT32 iMapIndex ) BOOLEAN GetSubIndexFromTileIndex( UINT16 usTileIndex, UINT16 *pusSubIndex ) { UINT32 uiType=0; + *pusSubIndex = 0xffff; + if( GetTileType( usTileIndex, &uiType ) ) { *pusSubIndex = usTileIndex - gTileTypeStartIndex[ uiType ] + 1; @@ -995,6 +997,8 @@ BOOLEAN GetTypeSubIndexFromTileIndex( UINT32 uiCheckType, UINT16 usIndex, UINT16 // Tile database is zero-based, Type indecies are 1-based! + *pusSubIndex = 0xffff; + CHECKF ( uiCheckType < NUMBEROFTILETYPES ); *pusSubIndex = usIndex - gTileTypeStartIndex[ uiCheckType ] + 1; @@ -1004,6 +1008,7 @@ BOOLEAN GetTypeSubIndexFromTileIndex( UINT32 uiCheckType, UINT16 usIndex, UINT16 BOOLEAN GetTypeSubIndexFromTileIndexChar( UINT32 uiCheckType, UINT16 usIndex, UINT8 *pubSubIndex ) { + *pubSubIndex = 0xff; // Tile database is zero-based, Type indecies are 1-based! @@ -1018,6 +1023,8 @@ BOOLEAN GetTileIndexFromTypeSubIndex( UINT32 uiCheckType, UINT16 usSubIndex, UIN { // Tile database is zero-based, Type indecies are 1-based! + *pusTileIndex = 0xffff; + CHECKF ( uiCheckType < NUMBEROFTILETYPES ); *pusTileIndex = usSubIndex + gTileTypeStartIndex[ uiCheckType ] - 1; @@ -1045,6 +1052,8 @@ BOOLEAN GetTileType( UINT16 usIndex, UINT32 *puiType ) { TILE_ELEMENT TileElem; + *puiType = 0xffffffff; + CHECKF( usIndex != NO_TILE ); CHECKF( usIndex < NUMBEROFTILES ); //lal bugfix @@ -1060,6 +1069,8 @@ BOOLEAN GetTileFlags( UINT16 usIndex, UINT32 *puiFlags ) { TILE_ELEMENT TileElem; + *puiFlags = 0; + CHECKF( usIndex != NO_TILE ); CHECKF( usIndex < NUMBEROFTILES ); @@ -1195,8 +1206,10 @@ BOOLEAN AnyLowerLand( UINT32 iMapIndex, UINT32 uiSrcType, UINT8 *pubLastLevel ) BOOLEAN GetWallOrientation( UINT16 usIndex, UINT16 *pusWallOrientation ) { - TILE_ELEMENT TileElem; + TILE_ELEMENT TileElem; + *pusWallOrientation = 0xffff; + CHECKF( usIndex != NO_TILE ); CHECKF( usIndex < NUMBEROFTILES ); //lal bugfix