From 24943a4759d290b2b01cc5d2607f6317b7ccfcb9 Mon Sep 17 00:00:00 2001 From: matthijs Date: Tue, 3 May 2005 19:31:33 +0000 Subject: (svn r2261) - Fix: When crashed vehicles try to find a depot for servicing, openttd asserts. Crashed vehicles shouldn't find depots anyway... --- roadveh_cmd.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'roadveh_cmd.c') diff --git a/roadveh_cmd.c b/roadveh_cmd.c index 670af9f6a..08507023d 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -353,6 +353,9 @@ int32 CmdSendRoadVehToDepot(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (v->type != VEH_Road || !CheckOwnership(v->owner)) return CMD_ERROR; + if (v->vehstatus & VS_CRASHED) + return CMD_ERROR; + if (v->current_order.type == OT_GOTO_DEPOT) { if (flags & DC_EXEC) { -- cgit v1.2.3-54-g00ecf