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

@@ -1341,7 +1341,12 @@ static void CrashAirplane(Aircraft *v)
AI::NewEvent(v->owner, new ScriptEventVehicleCrashed(v->index, vt, st == nullptr ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING));
Game::NewEvent(new ScriptEventVehicleCrashed(v->index, vt, st == nullptr ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING));
AddTileNewsItem(newsitem, NT_ACCIDENT, vt, nullptr, st != nullptr ? st->index : INVALID_STATION);
NewsType newstype = NT_ACCIDENT;
if (v->owner != _local_company) {
newstype = NT_ACCIDENT_OTHER;
}
AddTileNewsItem(newsitem, newstype, vt, nullptr, st != nullptr ? st->index : INVALID_STATION);
ModifyStationRatingAround(vt, v->owner, -160, 30);
if (_settings_client.sound.disaster) SndPlayVehicleFx(SND_12_EXPLOSION, v);