road/rail deteriation: use isOverWater() instead of hard-coded numbers
Note- this will allow deteriation of bridges even when there is traffic. This is a change from previous versions. git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@685 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
c272e200bf
commit
cd7537768d
1 changed files with 2 additions and 2 deletions
|
@ -122,7 +122,7 @@ class MapScanner
|
|||
{
|
||||
if (city.roadEffect < PRNG.nextInt(32))
|
||||
{
|
||||
if ((cchr & 15) < 2 || (cchr & 15) == 15)
|
||||
if (isOverWater(cchr))
|
||||
city.setTile(xpos, ypos, RIVER);
|
||||
else
|
||||
city.setTile(xpos, ypos, (char)(RUBBLE + PRNG.nextInt(4) + BULLBIT));
|
||||
|
@ -256,7 +256,7 @@ class MapScanner
|
|||
if (PRNG.nextInt(512) == 0) {
|
||||
if ((cchr & CONDBIT) == 0) {
|
||||
if (city.roadEffect < PRNG.nextInt(32)) {
|
||||
if (cchr9 < RAILBASE+2) {
|
||||
if (isOverWater(cchr)) {
|
||||
city.setTile(xpos,ypos,RIVER);
|
||||
} else {
|
||||
city.setTile(xpos,ypos,(char)(RUBBLE + PRNG.nextInt(4)+BULLBIT));
|
||||
|
|
Reference in a new issue