diff options
author | alberth <alberth@openttd.org> | 2009-06-01 11:43:36 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-06-01 11:43:36 +0000 |
commit | bab70a823dd810e1d4477f0c01d3a7b3e9b19ac8 (patch) | |
tree | 2668a1043fb310d44e67f4deb07871519d406a55 /src/roadveh_cmd.cpp | |
parent | 5e91bf0ad20e0c60b31e190a1f02f184020238de (diff) | |
download | openttd-bab70a823dd810e1d4477f0c01d3a7b3e9b19ac8.tar.xz |
(svn r16491) -Codechange: Added parentheses around bitwise operators for code style.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index d52795f9e..59166a46a 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -440,8 +440,8 @@ CommandCost CmdTurnRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 RoadVehicle *v = RoadVehicle::GetIfValid(p1); if (v == NULL || !CheckOwnership(v->owner)) return CMD_ERROR; - if (v->vehstatus & VS_STOPPED || - v->vehstatus & VS_CRASHED || + if ((v->vehstatus & VS_STOPPED) || + (v->vehstatus & VS_CRASHED) || v->breakdown_ctr != 0 || v->overtaking != 0 || v->state == RVSB_WORMHOLE || @@ -935,7 +935,7 @@ static void RoadVehCheckOvertake(RoadVehicle *v, RoadVehicle *u) od.tile = v->tile + TileOffsByDiagDir(DirToDiagDir(v->direction)); if (CheckRoadBlockedForOvertaking(&od)) return; - if (od.u->cur_speed == 0 || od.u->vehstatus& VS_STOPPED) { + if (od.u->cur_speed == 0 || (od.u->vehstatus & VS_STOPPED)) { v->overtaking_ctr = 0x11; v->overtaking = 0x10; } else { @@ -1132,7 +1132,7 @@ do_it:; * pretend we are heading for the tile in front, we'll * see from there */ desttile += TileOffsByDiagDir(dir); - if (desttile == tile && trackdirs & _road_exit_dir_to_incoming_trackdirs[dir]) { + if (desttile == tile && (trackdirs & _road_exit_dir_to_incoming_trackdirs[dir])) { /* If we are already in front of the * station/depot and we can get in from here, * we enter */ |