tile animation: synthesize ANIMBIT when saving (for compatibility)

Also, add some safety checks in case Tiles.get() is called with an out-of-range tile number.

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@739 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
jason@long.name 2013-07-18 13:31:50 +00:00
parent 568377ccc8
commit 9bf2e91783
3 changed files with 15 additions and 4 deletions

View file

@ -283,7 +283,7 @@ public class TileConstants
public static boolean isAnimated(int tile)
{
TileSpec spec = Tiles.get(tile & LOMASK);
return spec.animNext != null;
return spec != null && spec.animNext != null;
}
//used by setFire()