Changeset - r10653:4d61fce5cba8
[Not reviewed]
master
0 1 0
rubidium - 16 years ago 2009-01-10 14:01:17
rubidium@openttd.org
(svn r14955) -Fix: newgrf station specs didn't get deallocated when building a new station part over them.
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -1099,7 +1099,11 @@ CommandCost CmdBuildRailroadStation(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 */
 
				DeallocateSpecFromStation(st, old_specindex);
 

	
 
				SetCustomStationSpecIndex(tile, specindex);
 
				SetStationTileRandomBits(tile, GB(Random(), 0, 4));
 
				SetStationAnimationFrame(tile, 0);
0 comments (0 inline, 0 general)