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:
parent
93381a3490
commit
ff84c48091
1 changed files with 4 additions and 5 deletions
|
@ -107,11 +107,6 @@ class MapScanner extends TileBehavior
|
||||||
|
|
||||||
boolean setZonePower()
|
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 oldPower = (rawTile & PWRBIT) == PWRBIT;
|
||||||
boolean newPower = (
|
boolean newPower = (
|
||||||
tile == NUCLEAR ||
|
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();
|
setZonePower();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue