coalplant- do not eliminate fire when animating smoke

This changes the behavior of a coal plant on fire.
Previously, if the smoke tiles were on fire when the coal plant
is activated, the coalSmoke() function would replace the fire tiles
with the animated smoke.

Now, the animated smoke tiles are only set when the tiles are
the original coal plant tiles.  Fire needs to burn itself out,
the rubble must be bulldozed, then the plant must call repairZone()
for itself, and only then will the animated smoke be added back in.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@566 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
jason@long.name 2013-02-20 02:04:51 +00:00
parent 4fe20e253e
commit aadacd9210

View file

@ -1337,9 +1337,12 @@ class MapScanner
final int [] dy = { -1, -1, 0, 0 };
for (int z = 0; z < 4; z++) {
city.setTile(xpos + dx[z], ypos + dy[z],
(char) (SmTb[z] | ANIMBIT | CONDBIT | PWRBIT | BURNBIT)
);
int tile = city.getTile(xpos+dx[z], ypos+dy[z]) & LOMASK;
if (tile >= COALBASE && tile < COALBASE + 4*4) {
city.setTile(xpos + dx[z], ypos + dy[z],
(char) (SmTb[z] | ANIMBIT | CONDBIT | PWRBIT | BURNBIT)
);
}
}
}