summaryrefslogtreecommitdiff
path: root/src/base_consist.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-07-29 16:48:00 +0000
committerfrosch <frosch@openttd.org>2012-07-29 16:48:00 +0000
commit9527bad3a7fe4098ff2ebe2173e2d7b14d1aaaa7 (patch)
treeda0bb313402db4fcc98c06b17dcca2f945f0af62 /src/base_consist.cpp
parentfcbe53d204ae2f66054c2f93ada1eda46e2ef6b9 (diff)
downloadopenttd-9527bad3a7fe4098ff2ebe2173e2d7b14d1aaaa7.tar.xz
(svn r24446) -Add [FS#5199]: Store more consist properties in order backups.
Diffstat (limited to 'src/base_consist.cpp')
-rw-r--r--src/base_consist.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/base_consist.cpp b/src/base_consist.cpp
index 93b97e10e..005c88672 100644
--- a/src/base_consist.cpp
+++ b/src/base_consist.cpp
@@ -11,6 +11,7 @@
#include "stdafx.h"
#include "base_consist.h"
+#include "vehicle_base.h"
BaseConsist::~BaseConsist()
{
@@ -28,6 +29,16 @@ void BaseConsist::CopyConsistPropertiesFrom(const BaseConsist *src)
free(this->name);
this->name = src->name != NULL ? strdup(src->name) : NULL;
+ this->current_order_time = src->current_order_time;
+ this->lateness_counter = src->lateness_counter;
+ this->timetable_start = src->timetable_start;
+
this->service_interval = src->service_interval;
+
this->cur_real_order_index = src->cur_real_order_index;
+ this->cur_implicit_order_index = src->cur_implicit_order_index;
+
+ if (HasBit(src->vehicle_flags, VF_TIMETABLE_STARTED)) SetBit(this->vehicle_flags, VF_TIMETABLE_STARTED);
+ if (HasBit(src->vehicle_flags, VF_AUTOFILL_TIMETABLE)) SetBit(this->vehicle_flags, VF_AUTOFILL_TIMETABLE);
+ if (HasBit(src->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME)) SetBit(this->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME);
}