summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-26 20:16:02 +0000
committerrubidium <rubidium@openttd.org>2007-08-26 20:16:02 +0000
commit39f17c9de45b8449961d0165e922186ed8b7c2ef (patch)
tree37a1204079f8b5a2a2c336756f4f8e105bc4e95a /src/roadveh_cmd.cpp
parent1a82bd935006114f885b1b607ac43dd47fd573a5 (diff)
downloadopenttd-39f17c9de45b8449961d0165e922186ed8b7c2ef.tar.xz
(svn r10983) -Codechange: use vehstatus & VS_CRASHED instead of some other "methods" custom to each vehicle to determine whether the vehicle is crashed.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index d85203173..82a02305a 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -534,7 +534,7 @@ CommandCost CmdTurnRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (v->type != VEH_ROAD || !CheckOwnership(v->owner)) return CMD_ERROR;
if (v->vehstatus & VS_STOPPED ||
- v->u.road.crashed_ctr != 0 ||
+ v->vehstatus & VS_CRASHED ||
v->breakdown_ctr != 0 ||
v->u.road.overtaking != 0 ||
v->u.road.state == RVSB_WORMHOLE ||
@@ -1794,7 +1794,7 @@ static void RoadVehController(Vehicle *v)
if (v->u.road.reverse_ctr != 0) v->u.road.reverse_ctr--;
/* handle crashed */
- if (v->u.road.crashed_ctr != 0) {
+ if (v->vehstatus & VS_CRASHED) {
RoadVehIsCrashed(v);
return;
}