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/water_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/water_cmd.cpp')
-rw-r--r-- | src/water_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 5e37c16dd..6a3b73065 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -977,7 +977,7 @@ static void FloodVehicle(Vehicle *v) AI::NewEvent(v->owner, new ScriptEventVehicleCrashed(v->index, v->tile, ScriptEventVehicleCrashed::CRASH_FLOODED)); Game::NewEvent(new ScriptEventVehicleCrashed(v->index, v->tile, ScriptEventVehicleCrashed::CRASH_FLOODED)); SetDParam(0, pass); - AddVehicleNewsItem(STR_NEWS_DISASTER_FLOOD_VEHICLE, NT_ACCIDENT, v->index); + AddTileNewsItem(STR_NEWS_DISASTER_FLOOD_VEHICLE, NT_ACCIDENT, v->tile); CreateEffectVehicleRel(v, 4, 4, 8, EV_EXPLOSION_LARGE); if (_settings_client.sound.disaster) SndPlayVehicleFx(SND_12_EXPLOSION, v); } |