mirror of https://github.com/OpenTTD/OpenTTD
Change: make crash chance at short runway independent of plane crash rate setting (there's a cheat for this)
parent
3f327116db
commit
3c94bddbc2
|
@ -1309,18 +1309,17 @@ static void CrashAirplane(Aircraft *v)
|
|||
*/
|
||||
static void MaybeCrashAirplane(Aircraft *v)
|
||||
{
|
||||
if (_settings_game.vehicle.plane_crashes == 0) return;
|
||||
|
||||
Station *st = Station::Get(v->targetairport);
|
||||
|
||||
/* FIXME -- MaybeCrashAirplane -> increase crashing chances of very modern airplanes on smaller than AT_METROPOLITAN airports */
|
||||
uint32 prob = (0x4000 << _settings_game.vehicle.plane_crashes);
|
||||
uint32 prob;
|
||||
if ((st->airport.GetFTA()->flags & AirportFTAClass::SHORT_STRIP) &&
|
||||
(AircraftVehInfo(v->engine_type)->subtype & AIR_FAST) &&
|
||||
!_cheats.no_jetcrash.value) {
|
||||
prob /= 20;
|
||||
prob = 3276;
|
||||
} else {
|
||||
prob /= 1500;
|
||||
if (_settings_game.vehicle.plane_crashes == 0) return;
|
||||
prob = (0x4000 << _settings_game.vehicle.plane_crashes) / 1500;
|
||||
}
|
||||
|
||||
if (GB(Random(), 0, 22) > prob) return;
|
||||
|
|
|
@ -1257,8 +1257,8 @@ STR_CONFIG_SETTING_PLANE_SPEED :Plane speed fac
|
|||
STR_CONFIG_SETTING_PLANE_SPEED_HELPTEXT :Set the relative speed of planes compared to other vehicle types, to reduce the amount of income of transport by aircraft
|
||||
STR_CONFIG_SETTING_PLANE_SPEED_VALUE :1 / {COMMA}
|
||||
STR_CONFIG_SETTING_PLANE_CRASHES :Number of plane crashes: {STRING2}
|
||||
STR_CONFIG_SETTING_PLANE_CRASHES_HELPTEXT :Set the chance of an aircraft crash happening
|
||||
STR_CONFIG_SETTING_PLANE_CRASHES_NONE :None
|
||||
STR_CONFIG_SETTING_PLANE_CRASHES_HELPTEXT :Set the chance of a random aircraft crash happening.{}* Large airplanes always have a risk of crashing when landing on small airports
|
||||
STR_CONFIG_SETTING_PLANE_CRASHES_NONE :None*
|
||||
STR_CONFIG_SETTING_PLANE_CRASHES_REDUCED :Reduced
|
||||
STR_CONFIG_SETTING_PLANE_CRASHES_NORMAL :Normal
|
||||
STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :Allow drive-through road stops on town owned roads: {STRING2}
|
||||
|
|
Loading…
Reference in New Issue