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:
jason@long.name 2013-02-20 02:04:58 +00:00
parent aadacd9210
commit 1da609a5ce

View file

@ -2366,14 +2366,24 @@ public class Micropolis
rateOGMem[ypos/8][xpos/8] -= 20;
int sz = TileConstants.getZoneSizeFor(zoneTile);
for (int x = 0; x < sz; x++) {
for (int y = 0; y < sz; y++) {
int zoneBase = (zoneTile&LOMASK)-1-sz;
for (int y = 0; y < sz; y++) {
for (int x = 0; x < sz; x++, zoneBase++) {
int xtem = xpos - 1 + x;
int ytem = ypos - 1 + y;
if (!testBounds(xtem, ytem))
continue;
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) {
setTile(xtem, ytem, (char)(t | BULLBIT));
}