Update: add setting to hide news about competitors vehicle crash (#9653)

This commit is contained in:
Guillaume Renoult
2021-11-08 05:54:50 +11:00
committed by GitHub
parent b4bd7b367e
commit c38af72978
8 changed files with 31 additions and 2 deletions

View File

@@ -553,7 +553,13 @@ static void RoadVehCrash(RoadVehicle *v)
SetDParam(0, pass);
StringID newsitem = (pass == 1) ? STR_NEWS_ROAD_VEHICLE_CRASH_DRIVER : STR_NEWS_ROAD_VEHICLE_CRASH;
AddTileNewsItem(newsitem, NT_ACCIDENT, v->tile);
NewsType newstype = NT_ACCIDENT;
if (v->owner != _local_company) {
newstype = NT_ACCIDENT_OTHER;
}
AddTileNewsItem(newsitem, newstype, v->tile);
ModifyStationRatingAround(v->tile, v->owner, -160, 22);
if (_settings_client.sound.disaster) SndPlayVehicleFx(SND_12_EXPLOSION, v);