diff options
author | Patric Stout <truebrain@openttd.org> | 2021-01-05 21:39:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 21:39:23 +0100 |
commit | dff7ee8e1c68199a0dc105e82e588ac097543645 (patch) | |
tree | 317e29ae8a6d1db52f5e7cebf26356559c5193f8 /src/train_cmd.cpp | |
parent | 0fd2108f7ffe53faac468e82879e46c830df4038 (diff) | |
download | openttd-dff7ee8e1c68199a0dc105e82e588ac097543645.tar.xz |
Fix #7611: keeps news about accidents around after vehicle is cleaned up (#8497)
When a vehicle is cleaned up, all news that points to the news is
also removed. This was a bit evil, as it would also remove any
news related to crashed, acting like the crash never happened.
This left players a bit in the dark what was going on exactly.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 0c4a25eef..ae9cb45de 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -3052,7 +3052,7 @@ static bool CheckTrainCollision(Train *v) if (tcc.num == 0) return false; SetDParam(0, tcc.num); - AddVehicleNewsItem(STR_NEWS_TRAIN_CRASH, NT_ACCIDENT, v->index); + AddTileNewsItem(STR_NEWS_TRAIN_CRASH, NT_ACCIDENT, v->tile); ModifyStationRatingAround(v->tile, v->owner, -160, 30); if (_settings_client.sound.disaster) SndPlayVehicleFx(SND_13_BIG_CRASH, v); |