From 39b45c89d867cefc19a849c2e7d10f3b3707f070 Mon Sep 17 00:00:00 2001 From: Flugente Date: Thu, 12 Feb 2015 19:23:50 +0000 Subject: [PATCH] No nighttime movement penalty for militia groups if they move inside a town. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7731 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Strategic Movement.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Strategic/Strategic Movement.cpp b/Strategic/Strategic Movement.cpp index 92fed1a58..354b37c5b 100644 --- a/Strategic/Strategic Movement.cpp +++ b/Strategic/Strategic Movement.cpp @@ -2784,9 +2784,13 @@ void InitiateGroupMovementToNextSector( GROUP *pGroup ) { // As the player orders militia to move, a chance-based system is ill-advised - the player would simply cancel and reassign the order, leading to bypassing the mechanci in a tedious way // so instead, we always add a penalty, but it will be lower + // however, do not give such a penalty for movement inside a town - the player might just want to redistribute his troops, and this would be tedious if ( GetWorldHour( ) >= 21 || GetWorldHour( ) <= 4 ) { - uiSleepMinutes = 280; + if ( GetTownIdForSector( pGroup->ubSectorX, pGroup->ubSectorY ) != GetTownIdForSector( pGroup->ubNextX, pGroup->ubNextY ) ) + { + uiSleepMinutes = 280; + } } }