From c2b7d0192d2b07ca7e4d87d583dabb2e43df49ec Mon Sep 17 00:00:00 2001 From: bjarni Date: Thu, 8 Mar 2007 21:39:34 +0000 Subject: (svn r9072) -Codechange: [Orders] added methods to orders to free them and check if they are in use --- src/oldloader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/oldloader.cpp') 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; -- cgit v1.2.3-54-g00ecf