mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(svn r14955) -Fix: newgrf station specs didn't get deallocated when building a new station part over them.
This commit is contained in:
parent
7878405a12
commit
1b546505d2
@ -1099,7 +1099,11 @@ CommandCost CmdBuildRailroadStation(TileIndex tile_org, uint32 flags, uint32 p1,
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user