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.
This commit is contained in:
Patric Stout
2021-01-05 21:39:23 +01:00
committed by GitHub
parent 0fd2108f7f
commit dff7ee8e1c
6 changed files with 10 additions and 14 deletions

View File

@@ -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);