changeset 3476:798ceee089b7 draft

(svn r4321) For ships check the ship state, not the road state. This bug was harmless, because both states are at the same byte in the vehicle type specific union.
author tron <tron@openttd.org>
date Sat, 08 Apr 2006 06:55:43 +0000
parents cfc8648d09e4
children a247df51f17b
files ship_cmd.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -913,7 +913,7 @@
 
 	SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);
 
-	if (!IsTileDepotType(v->tile, TRANSPORT_WATER) || v->u.road.state != 0x80 || !(v->vehstatus&VS_STOPPED))
+	if (!IsTileDepotType(v->tile, TRANSPORT_WATER) || v->u.ship.state != 0x80 || !(v->vehstatus&VS_STOPPED))
 		return_cmd_error(STR_980B_SHIP_MUST_BE_STOPPED_IN);
 
 	if (flags & DC_EXEC) {