diff --git a/src/java/com/threerings/media/tile/TileSet.java b/src/java/com/threerings/media/tile/TileSet.java index ac2914136..b5a2743ab 100644 --- a/src/java/com/threerings/media/tile/TileSet.java +++ b/src/java/com/threerings/media/tile/TileSet.java @@ -1,5 +1,5 @@ // -// $Id: TileSet.java,v 1.30 2002/09/17 20:38:42 mdb Exp $ +// $Id: TileSet.java,v 1.31 2002/09/17 21:17:15 mdb Exp $ package com.threerings.media.tile; @@ -71,8 +71,9 @@ public abstract class TileSet { _imagePath = imagePath; - // clear out any reference to a loaded image + // clear out any reference to a loaded image and cached tiles _tilesetImg = null; + _tiles = null; } /** @@ -127,6 +128,16 @@ public abstract class TileSet return tset; } + // documentation inherited + public Object clone () + throws CloneNotSupportedException + { + TileSet dup = (TileSet)clone(); + // clear out the tileset cache + dup._tiles = null; + return dup; + } + /** * Returns a new tileset that is a clone of this tileset with the * image path updated to reference the given path. Useful for @@ -296,7 +307,7 @@ public abstract class TileSet /** A sparse array containing the tiles that have been requested from * this tileset. */ - protected Tile[] _tiles; + protected transient Tile[] _tiles; /** The entity from which we obtain our tile image. */ protected transient ImageProvider _improv;