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
This commit is contained in:
Flugente
2015-02-12 19:23:50 +00:00
parent 5826dd63a6
commit 39b45c89d8
+5 -1
View File
@@ -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;
}
}
}