mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-08 23:19:40 +00:00
(svn r19396) -Fix [FS#3690] (r19351): trying to remove a too large rail station rect caused crashes
This commit is contained in:
parent
dfa528d058
commit
fa1d9816ea
@ -1416,6 +1416,7 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &affected
|
||||
DoClearSquare(tile);
|
||||
if (keep_rail) MakeRailNormal(tile, owner, TrackToTrackBits(track), rt);
|
||||
|
||||
st->rect.AfterRemoveTile(st, tile);
|
||||
AddTrackToSignalBuffer(tile, track, owner);
|
||||
YapfNotifyTrackLayoutChange(tile, track);
|
||||
|
||||
@ -1442,7 +1443,6 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &affected
|
||||
for (T **stp = affected_stations.Begin(); stp != affected_stations.End(); stp++) {
|
||||
T *st = *stp;
|
||||
|
||||
st->rect.AfterRemoveRect(st, ta);
|
||||
/* now we need to make the "spanned" area of the railway station smaller
|
||||
* if we deleted something at the edges.
|
||||
* we also need to adjust train_tile. */
|
||||
|
Loading…
Reference in New Issue
Block a user