diff options
author | rubidium <rubidium@openttd.org> | 2009-07-01 14:51:05 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-01 14:51:05 +0000 |
commit | 927c4a0fe8b836fe88ca0636d2249016501dc9c3 (patch) | |
tree | 076df478323806636b50630f76dd7415abc0e504 /src/station_cmd.cpp | |
parent | 8db99f57f87776dd86b7b3d12b9150363dd8d688 (diff) | |
download | openttd-927c4a0fe8b836fe88ca0636d2249016501dc9c3.tar.xz |
(svn r16709) -Fix [FS#2994]: the list of animated tiles could have duplicates (only for old savegames) and tiles that weren't animated
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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; |