summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-09-18 16:31:31 +0000
committerdarkvater <darkvater@openttd.org>2004-09-18 16:31:31 +0000
commitc62f670bca3f1ab6b2afcad25d8062305fecfb52 (patch)
treef5d010b2513cd489a6bf1cbfd663ca06d8443c74 /misc.c
parentd1a88cbbca61f017ebb21e3963240e1b8b76dc87 (diff)
downloadopenttd-c62f670bca3f1ab6b2afcad25d8062305fecfb52.tar.xz
(svn r292) -Fix: [1030275] 'Service at' orders ignored after 2090. After 2090 year is reset to 1. Jan 2090, so most of the time, last service was in the future and no service ensured.
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index b08fd264e..32290640e 100644
--- a/misc.c
+++ b/misc.c
@@ -630,8 +630,12 @@ void IncreaseDate()
/* check if we reached 2090, that's the maximum year. */
if (_cur_year == 171) {
+ Vehicle *v;
_cur_year = 170;
_date = 62093;
+ FOR_ALL_VEHICLES(v) {
+ v->date_of_last_service -= 365; // 1 year is 365 days long
+ }
}
if (_patches.auto_euro)