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
This commit is contained in:
Flugente
2020-07-06 21:25:45 +00:00
parent 3864aca117
commit 04fda674e5
+4 -4
View File
@@ -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;
}
}
}