From 04fda674e5e1748d4de48c04f0bce02f5583bc5d Mon Sep 17 00:00:00 2001 From: Flugente Date: Mon, 6 Jul 2020 21:25:45 +0000 Subject: [PATCH] Fix: radio operator in a city can give movement commands to any militia in a non-city sector git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8845 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/mapscreen.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Strategic/mapscreen.cpp b/Strategic/mapscreen.cpp index bbb4f1c4..40fde98b 100644 --- a/Strategic/mapscreen.cpp +++ b/Strategic/mapscreen.cpp @@ -16900,10 +16900,10 @@ BOOLEAN CanGiveStrategicMilitiaMoveOrder( INT16 sMapX, INT16 sMapY ) if ( fRadioOperator && townid == BLANK_SECTOR && soldiertownid != BLANK_SECTOR ) { // check whether adjacent sectors belong to the town we search for - if ( GetTownIdForSector( min( sMapX + 1, MAP_WORLD_X - 2 ), sMapY ) == townid ) return TRUE; - if ( GetTownIdForSector( max( sMapX - 1, 1 ), sMapY ) == townid ) return TRUE; - if ( GetTownIdForSector( sMapX, min( sMapY + 1, MAP_WORLD_Y - 2 ) ) == townid ) return TRUE; - if ( GetTownIdForSector( sMapX, max( sMapY - 1, 1 ) ) == townid ) return TRUE; + if ( GetTownIdForSector( min( sMapX + 1, MAP_WORLD_X - 2 ), sMapY ) == soldiertownid ) return TRUE; + if ( GetTownIdForSector( max( sMapX - 1, 1 ), sMapY ) == soldiertownid ) return TRUE; + if ( GetTownIdForSector( sMapX, min( sMapY + 1, MAP_WORLD_Y - 2 ) ) == soldiertownid ) return TRUE; + if ( GetTownIdForSector( sMapX, max( sMapY - 1, 1 ) ) == soldiertownid ) return TRUE; } } }