mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user