Merged from revision: 7120

- Disabled militia assignment popup window when battle occurs for hostile sectors adjacent to associated town to prevent radio operator exploits (by Buggler)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7121 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-03-28 19:50:24 +00:00
parent 6c4c3a9d8c
commit 3341992db4
+6
View File
@@ -7126,6 +7126,12 @@ BOOLEAN CanRedistributeMilitiaInSector( INT16 sClickedSectorX, INT16 sClickedSec
// the fight is within this town! Can't redistribute.
return( FALSE );
}
// to prevent radio operator exploits for hostile sectors adjacent to towns
else if ( ( sSectorX == gWorldSectorX && sSectorY == gWorldSectorY + 1 ) || ( sSectorX == gWorldSectorX + 1 && sSectorY == gWorldSectorY ) ||
( sSectorX == gWorldSectorX - 1 && sSectorY == gWorldSectorY ) || ( sSectorX == gWorldSectorX && sSectorY == gWorldSectorY - 1 ) )
{
return( FALSE );
}
}