summaryrefslogtreecommitdiff
path: root/src/oldloader.cpp
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-03-08 21:39:34 +0000
committerbjarni <bjarni@openttd.org>2007-03-08 21:39:34 +0000
commitc2b7d0192d2b07ca7e4d87d583dabb2e43df49ec (patch)
treecfdbc180c9140ada4cb0bc22da9defe931609d16 /src/oldloader.cpp
parentdaeac3d310a6bf367eb77f0b965f8930dc187899 (diff)
downloadopenttd-c2b7d0192d2b07ca7e4d87d583dabb2e43df49ec.tar.xz
(svn r9072) -Codechange: [Orders] added methods to orders to free them and check if they are in use
Diffstat (limited to 'src/oldloader.cpp')
-rw-r--r--src/oldloader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/oldloader.cpp b/src/oldloader.cpp
index bdf1cf9e6..940661a95 100644
--- a/src/oldloader.cpp
+++ b/src/oldloader.cpp
@@ -486,9 +486,9 @@ static bool LoadOldOrder(LoadgameState *ls, int num)
AssignOrder(GetOrder(num), UnpackOldOrder(_old_order));
/* Relink the orders to eachother (in TTD(Patch) the orders for one
- vehicle are behind eachother, with OT_NOTHING as indication that
+ vehicle are behind eachother, with an invalid order (OT_NOTHING) as indication that
it is the last order */
- if (num > 0 && GetOrder(num)->type != OT_NOTHING)
+ if (num > 0 && GetOrder(num)->IsValid())
GetOrder(num - 1)->next = GetOrder(num);
return true;