summaryrefslogtreecommitdiff
path: root/order_cmd.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-04-11 20:54:25 +0000
committerDarkvater <darkvater@openttd.org>2005-04-11 20:54:25 +0000
commit2397ff86e65b2569fbc9e14e70991f44c29a0db6 (patch)
treeed024e987f57f23fee9bfa53bbd1a640d8ebd288 /order_cmd.c
parent90cc36f7e2466f102668073e0d1f104f30912887 (diff)
downloadopenttd-2397ff86e65b2569fbc9e14e70991f44c29a0db6.tar.xz
(svn r2184) - CodeChange: remove the copy of ClearSlot(), which is now also called for CmdSkipOrder(). This also fixes the involuntary crash introduced 2 revisions ago
Diffstat (limited to 'order_cmd.c')
-rw-r--r--order_cmd.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/order_cmd.c b/order_cmd.c
index 5553b8ac9..9ddf3920d 100644
--- a/order_cmd.c
+++ b/order_cmd.c
@@ -7,7 +7,6 @@
#include "player.h"
#include "news.h"
#include "saveload.h"
-#include "debug.h"
enum {
/* Max orders: 64000 (64 * 1000) */
@@ -362,13 +361,8 @@ int32 CmdSkipOrder(int x, int y, uint32 flags, uint32 vehicle_id, uint32 not_use
if (v->type == VEH_Train)
v->u.rail.days_since_order_progr = 0;
- if (v->type == VEH_Road && v->u.road.slot != NULL) {
- //Clear the slot ClearSlot() of roadveh_cmd.c
- DEBUG(ms, 3) ("Multistop: Clearing slot %d at 0x%x", v->u.road.slotindex, v->dest_tile);
- v->u.road.slot = NULL;
- v->u.road.slot_age = 0;
- v->u.road.slot->slot[v->u.road.slotindex] = INVALID_SLOT;
- }
+ if (v->type == VEH_Road)
+ ClearSlot(v, v->u.road.slot);
}
/* NON-stop flag is misused to see if a train is in a station that is