From a0486b6b3ff18bd8e6082ff7bd859dace2d102ba Mon Sep 17 00:00:00 2001 From: Wanne Date: Mon, 25 Mar 2013 19:23:00 +0000 Subject: [PATCH] - Allows militia training for town sectors even when tag set to FALSE (by Buggler) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5959 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Assignments.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Strategic/Assignments.cpp b/Strategic/Assignments.cpp index 3afc45f2..8f55ab6e 100644 --- a/Strategic/Assignments.cpp +++ b/Strategic/Assignments.cpp @@ -1379,12 +1379,17 @@ BOOLEAN CanCharacterTrainMilitia( SOLDIERTYPE *pSoldier ) BOOLEAN DoesTownHaveRatingToTrainMilitia( INT8 bTownId ) { -DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Assignments1"); - // min loyalty rating? - if( ( gTownLoyalty[ bTownId ].ubRating < gGameExternalOptions.iMinLoyaltyToTrain ) ) + DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Assignments1"); + + // Ignores check if FALSE, thereby allowing militia training for town sectors with deactivated loyalty tag + if (gfTownUsesLoyalty[ bTownId ]) { - // nope - return( FALSE ); + // min loyalty rating? + if( ( gTownLoyalty[ bTownId ].ubRating < gGameExternalOptions.iMinLoyaltyToTrain ) ) + { + // nope + return( FALSE ); + } } return( TRUE );