Fix #10334: Store separate newgrf-safe version of date_of_last_service. (#11124)

This value is not changed when the date cheat is used, which caused issues with changing properties based on service date.

Co-authored-by: Peter Nelson <peter1138@openttd.org>
(cherry picked from commit 9a602ff304)
This commit is contained in:
Tyler Trahan
2023-08-06 12:57:10 -04:00
committed by Jonathan G Rennison
parent 5bcc71f2c2
commit b012d1100c
14 changed files with 27 additions and 3 deletions

View File

@@ -475,6 +475,7 @@ void AddArticulatedParts(Vehicle *first)
/* get common values from first engine */
v->owner = first->owner;
v->date_of_last_service = first->date_of_last_service;
v->date_of_last_service_newgrf = first->date_of_last_service_newgrf;
v->build_year = first->build_year;
v->cargo_subtype = 0;