coalsmoke: when coal plant blows up, stop its smoke animation
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@567 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
aadacd9210
commit
1da609a5ce
1 changed files with 12 additions and 2 deletions
|
@ -2366,14 +2366,24 @@ public class Micropolis
|
||||||
rateOGMem[ypos/8][xpos/8] -= 20;
|
rateOGMem[ypos/8][xpos/8] -= 20;
|
||||||
|
|
||||||
int sz = TileConstants.getZoneSizeFor(zoneTile);
|
int sz = TileConstants.getZoneSizeFor(zoneTile);
|
||||||
for (int x = 0; x < sz; x++) {
|
int zoneBase = (zoneTile&LOMASK)-1-sz;
|
||||||
for (int y = 0; y < sz; y++) {
|
|
||||||
|
for (int y = 0; y < sz; y++) {
|
||||||
|
for (int x = 0; x < sz; x++, zoneBase++) {
|
||||||
int xtem = xpos - 1 + x;
|
int xtem = xpos - 1 + x;
|
||||||
int ytem = ypos - 1 + y;
|
int ytem = ypos - 1 + y;
|
||||||
if (!testBounds(xtem, ytem))
|
if (!testBounds(xtem, ytem))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int t = getTile(xtem, ytem);
|
int t = getTile(xtem, ytem);
|
||||||
|
if ((zoneTile & LOMASK) == POWERPLANT &&
|
||||||
|
(t & LOMASK) >= COALSMOKE1 &&
|
||||||
|
(t & LOMASK) < COALSMOKE4+4) {
|
||||||
|
// animated coal smoke
|
||||||
|
setTile(xtem, ytem, (char)(zoneBase | CONDBIT | BULLBIT));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ((t & LOMASK) >= ROADBASE) {
|
if ((t & LOMASK) >= ROADBASE) {
|
||||||
setTile(xtem, ytem, (char)(t | BULLBIT));
|
setTile(xtem, ytem, (char)(t | BULLBIT));
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue