diff options
author | rubidium <rubidium@openttd.org> | 2007-04-18 22:10:36 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-04-18 22:10:36 +0000 |
commit | 80c259f64fd38cdb84f2bcb8a146e7ec4a448070 (patch) | |
tree | f018095aed2d70f8386d800c8e8ac662f4b9c8fa /src/vehicle.cpp | |
parent | 41cf2fa69b8ff60f1b1633b68f47434075d00d75 (diff) | |
download | openttd-80c259f64fd38cdb84f2bcb8a146e7ec4a448070.tar.xz |
(svn r9672) -Cleanup: lots of coding style fixes around operands.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index b902014fa..9ce8053e4 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -188,9 +188,9 @@ Vehicle *FindVehicleBetween(TileIndex from, TileIndex to, byte z, bool without_c } FOR_ALL_VEHICLES(veh) { if (without_crashed && (veh->vehstatus & VS_CRASHED) != 0) continue; - if ((veh->type == VEH_TRAIN || veh->type == VEH_ROAD) && (z==0xFF || veh->z_pos == z)) { - if ((veh->x_pos>>4) >= x1 && (veh->x_pos>>4) <= x2 && - (veh->y_pos>>4) >= y1 && (veh->y_pos>>4) <= y2) { + if ((veh->type == VEH_TRAIN || veh->type == VEH_ROAD) && (z == 0xFF || veh->z_pos == z)) { + if ((veh->x_pos >> 4) >= x1 && (veh->x_pos >> 4) <= x2 && + (veh->y_pos >> 4) >= y1 && (veh->y_pos >> 4) <= y2) { return veh; } } @@ -421,7 +421,7 @@ static void UpdateVehiclePosHash(Vehicle* v, int x, int y) int old_x = v->left_coord; int old_y = v->top_coord; - new_hash = (x == INVALID_COORD) ? NULL : &_vehicle_position_hash[GEN_HASH(x,y)]; + new_hash = (x == INVALID_COORD) ? NULL : &_vehicle_position_hash[GEN_HASH(x, y)]; old_hash = (old_x == INVALID_COORD) ? NULL : &_vehicle_position_hash[GEN_HASH(old_x, old_y)]; if (old_hash == new_hash) return; |