diff options
author | frosch <frosch@openttd.org> | 2012-07-29 16:48:00 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-07-29 16:48:00 +0000 |
commit | 9527bad3a7fe4098ff2ebe2173e2d7b14d1aaaa7 (patch) | |
tree | da0bb313402db4fcc98c06b17dcca2f945f0af62 /src/order_backup.cpp | |
parent | fcbe53d204ae2f66054c2f93ada1eda46e2ef6b9 (diff) | |
download | openttd-9527bad3a7fe4098ff2ebe2173e2d7b14d1aaaa7.tar.xz |
(svn r24446) -Add [FS#5199]: Store more consist properties in order backups.
Diffstat (limited to 'src/order_backup.cpp')
-rw-r--r-- | src/order_backup.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/order_backup.cpp b/src/order_backup.cpp index e6effaf0f..100348f8a 100644 --- a/src/order_backup.cpp +++ b/src/order_backup.cpp @@ -86,7 +86,7 @@ void OrderBackup::DoRestore(Vehicle *v) /* Make sure orders are in range */ v->UpdateRealOrderIndex(); - v->cur_implicit_order_index = v->cur_real_order_index; + if (v->cur_implicit_order_index >= v->GetNumOrders()) v->cur_implicit_order_index = v->cur_real_order_index; /* Restore vehicle group */ DoCommand(0, this->group, v->index, DC_EXEC, CMD_ADD_VEHICLE_GROUP); |