From c4b627af422075ce4a0e1026c52f871dd3f146c0 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 22 May 2009 22:33:05 +0000 Subject: (svn r16392) -Codechange: move some variables (the ones that aren't caches) from VehicleRail to Train --- src/vehicle_cmd.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/vehicle_cmd.cpp') diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index dc21d1000..774daeac3 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -349,7 +349,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint if (!CheckOwnership(v->owner)) return CMD_ERROR; - if (v->type == VEH_TRAIN && (!IsFrontEngine(v) || v->u.rail.crash_anim_pos >= 4400)) return CMD_ERROR; + if (v->type == VEH_TRAIN && (!IsFrontEngine(v) || ((Train *)v)->crash_anim_pos >= 4400)) return CMD_ERROR; /* check that we can allocate enough vehicles */ if (!(flags & DC_EXEC)) { @@ -381,8 +381,8 @@ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint if (flags & DC_EXEC) { w = Vehicle::Get(_new_vehicle_id); - if (v->type == VEH_TRAIN && HasBit(((Train *)v)->u.rail.flags, VRF_REVERSE_DIRECTION)) { - SetBit(((Train *)w)->u.rail.flags, VRF_REVERSE_DIRECTION); + if (v->type == VEH_TRAIN && HasBit(((Train *)v)->flags, VRF_REVERSE_DIRECTION)) { + SetBit(((Train *)w)->flags, VRF_REVERSE_DIRECTION); } if (v->type == VEH_TRAIN && !IsFrontEngine(v)) { -- cgit v1.2.3-54-g00ecf