summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-09-19 19:56:40 +0000
committerdominik <dominik@openttd.org>2004-09-19 19:56:40 +0000
commiteb445b5189adcffd5f6bd7b5cd9cc6a33e3fdf03 (patch)
tree1b917cd0e4f149a5616d67eb5710c8b659219f5b
parenta38e2d046acfb02da4c99b7b9db292c2e0007ab3 (diff)
downloadopenttd-eb445b5189adcffd5f6bd7b5cd9cc6a33e3fdf03.tar.xz
(svn r298) Fix: Engines from other climates do not appear any more when never_expire_vehicles is enabled
-rw-r--r--engine.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/engine.c b/engine.c
index c40c86786..faacb66a4 100644
--- a/engine.c
+++ b/engine.c
@@ -105,7 +105,10 @@ static void CalcEngineReliability(Engine *e)
uint max = e->reliability_max;
e->reliability = (int)age * (int)(e->reliability_final - max) / e->duration_phase_3 + max;
} else {
- e->player_avail = _patches.never_expire_vehicles ? -1 : 0;
+ // time's up for this engine
+ // make it either available to all players (if never_expire_vehicles is enabled and if it was available earlier)
+ // or disable this engine completely
+ e->player_avail = (_patches.never_expire_vehicles && e->player_avail)? -1 : 0;
e->reliability = e->reliability_final;
}
}