summaryrefslogtreecommitdiff
path: root/src/vehicle_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-07-01 22:22:01 +0000
committersmatz <smatz@openttd.org>2009-07-01 22:22:01 +0000
commitadc5363202629aa07c762f459d7e9f5bc78efa34 (patch)
treeb0c087f513113051159d435af05d823798b2ee67 /src/vehicle_cmd.cpp
parent15990079ce2bb53446305c5b61c7a620cd58b2dc (diff)
downloadopenttd-adc5363202629aa07c762f459d7e9f5bc78efa34.tar.xz
(svn r16717) -Codechange: make IsFrontEngine() member of Train
Diffstat (limited to 'src/vehicle_cmd.cpp')
-rw-r--r--src/vehicle_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp
index bd5e92554..071cc170c 100644
--- a/src/vehicle_cmd.cpp
+++ b/src/vehicle_cmd.cpp
@@ -350,7 +350,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
if (!CheckOwnership(v->owner)) return CMD_ERROR;
- if (v->type == VEH_TRAIN && (!IsFrontEngine(v) || Train::From(v)->crash_anim_pos >= 4400)) return CMD_ERROR;
+ if (v->type == VEH_TRAIN && (!Train::From(v)->IsFrontEngine() || Train::From(v)->crash_anim_pos >= 4400)) return CMD_ERROR;
/* check that we can allocate enough vehicles */
if (!(flags & DC_EXEC)) {
@@ -386,7 +386,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
SetBit(Train::From(w)->flags, VRF_REVERSE_DIRECTION);
}
- if (v->type == VEH_TRAIN && !IsFrontEngine(v)) {
+ if (v->type == VEH_TRAIN && !Train::From(v)->IsFrontEngine()) {
/* this s a train car
* add this unit to the end of the train */
CommandCost result = DoCommand(0, (w_rear->index << 16) | w->index, 1, flags, CMD_MOVE_RAIL_VEHICLE);