(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.
authordarkvater
Sat, 18 Sep 2004 16:31:31 +0000
changeset 286 b22e852634e4
parent 285 cf5213c8a919
child 287 121d79bcd34c
(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.
misc.c
--- a/misc.c	Sat Sep 18 16:29:12 2004 +0000
+++ b/misc.c	Sat Sep 18 16:31:31 2004 +0000
@@ -630,8 +630,12 @@
 
 	/* 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)