cleanup: move code that refreshes tile/rawTile closer to where it is needed

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@874 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
jason@long.name 2013-10-10 13:31:13 +00:00
parent 93381a3490
commit ff84c48091

View file

@ -107,11 +107,6 @@ class MapScanner extends TileBehavior
boolean setZonePower()
{
// refresh rawTile, tile, since this can get called after the
// tile's been changed
this.rawTile = city.map[ypos][xpos];
this.tile = (char) (rawTile & LOMASK);
boolean oldPower = (rawTile & PWRBIT) == PWRBIT;
boolean newPower = (
tile == NUCLEAR ||
@ -175,6 +170,10 @@ class MapScanner extends TileBehavior
}
}
// refresh rawTile, tile
this.rawTile = city.map[ypos][xpos];
this.tile = (char) (rawTile & LOMASK);
setZonePower();
return true;
}