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:
parent
568377ccc8
commit
9bf2e91783
3 changed files with 15 additions and 4 deletions
|
@ -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()
|
||||
|
|
Reference in a new issue