From 927c4a0fe8b836fe88ca0636d2249016501dc9c3 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 1 Jul 2009 14:51:05 +0000 Subject: (svn r16709) -Fix [FS#2994]: the list of animated tiles could have duplicates (only for old savegames) and tiles that weren't animated --- src/station_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/station_cmd.cpp') diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index bd2c41dfe..7db3d6d6c 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1003,6 +1003,8 @@ CommandCost CmdBuildRailroadStation(TileIndex tile_org, DoCommandFlag flags, uin } } + /* Remove animation if overbuilding */ + DeleteAnimatedTile(tile); byte old_specindex = IsTileType(tile, MP_STATION) ? GetCustomStationSpecIndex(tile) : 0; MakeRailStation(tile, st->owner, st->index, axis, layout & ~1, (RailType)GB(p1, 0, 4)); /* Free the spec if we overbuild something */ @@ -2948,6 +2950,7 @@ void BuildOilRig(TileIndex tile) st->string_id = GenerateStationName(st, tile, STATIONNAMING_OILRIG); assert(IsTileType(tile, MP_INDUSTRY)); + DeleteAnimatedTile(tile); MakeOilrig(tile, st->index, GetWaterClass(tile)); st->owner = OWNER_NONE; -- cgit v1.2.3-54-g00ecf