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 | 7577954ced47f09803bc1b3881d47f222dbd306b (patch) | |
tree | f018095aed2d70f8386d800c8e8ac662f4b9c8fa /src/vehicle.cpp | |
parent | 0d32783f87b9a32fa8f0bf539514ed08faebbd2a (diff) | |
download | openttd-7577954ced47f09803bc1b3881d47f222dbd306b.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; |