From fcad428a12fe39800730b64d88d3579f0d0dde31 Mon Sep 17 00:00:00 2001 From: silversurfer Date: Tue, 29 Mar 2016 14:08:26 +0000 Subject: [PATCH] Fix: When MIN_DELAY_ENEMY_REINFORCEMENTS was set in Ja2_Options.ini incoming enemy troops were not placed on the map because their reinforcement timer was not met yet. Also the game was paused so the timer could never run at all. The game is now unpaused whenever we enter the tactical screen. Also if there are no enemies on the map yet the minimum reinforcement delay is ignored. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8131 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameVersion.cpp | 18 +++++++++--------- Strategic/Queen Command.cpp | 3 ++- Strategic/mapscreen.cpp | 1 + 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/GameVersion.cpp b/GameVersion.cpp index 8d351a26..520b75c9 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -15,9 +15,9 @@ #ifdef JA2EDITOR #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8126 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8131 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8126 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8131 (Development Build)" }; #endif // ------------------------------ @@ -27,11 +27,11 @@ //DEBUG BUILD VERSION #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8126 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8131 (Development Build)" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8126 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8131 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8126 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8131 (Development Build)" }; #endif #elif defined CRIPPLED_VERSION @@ -46,16 +46,16 @@ //RELEASE BUILD VERSION #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8126 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8131 (Development Build)" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8126 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8131 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Release v1.13.8126 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release v1.13.8131 (Development Build)" }; #endif #endif -CHAR8 czVersionNumber[16] = { "Build 16.03.26" }; //YY.MM.DD +CHAR8 czVersionNumber[16] = { "Build 16.03.29" }; //YY.MM.DD CHAR16 zTrackingNumber[16] = { L"Z" }; // SAVE_GAME_VERSION is defined in header, change it there diff --git a/Strategic/Queen Command.cpp b/Strategic/Queen Command.cpp index 81da3f7e..f47fee02 100644 --- a/Strategic/Queen Command.cpp +++ b/Strategic/Queen Command.cpp @@ -1614,7 +1614,8 @@ void AddPossiblePendingEnemiesToBattle() } ubSlots = NumFreeSlots( ENEMY_TEAM ); - if(gGameExternalOptions.sMinDelayEnemyReinforcements)//dnl ch68 080913 + // silversurfer: Only if there are enemy troops in the sector already we can talk about "reinforcements". If no troops are there we will spawn the incoming troops without delay. + if( gGameExternalOptions.sMinDelayEnemyReinforcements && gTacticalStatus.Team[ENEMY_TEAM].bTeamActive )//dnl ch68 080913 { if(gTacticalStatus.Team[ENEMY_TEAM].bAwareOfOpposition == TRUE) { diff --git a/Strategic/mapscreen.cpp b/Strategic/mapscreen.cpp index 279b0e91..04d8a794 100644 --- a/Strategic/mapscreen.cpp +++ b/Strategic/mapscreen.cpp @@ -8778,6 +8778,7 @@ INT32 iCounter2 = 0; { // set compressed mode to Normal (X1) SetGameTimeCompressionLevel( TIME_COMPRESS_X1 ); + UnPauseGame(); } else // going to another screen (options, laptop, save/load) {