equal
deleted
inserted
replaced
178 int y2 = TileY(to); |
178 int y2 = TileY(to); |
179 Vehicle *veh; |
179 Vehicle *veh; |
180 |
180 |
181 /* Make sure x1 < x2 or y1 < y2 */ |
181 /* Make sure x1 < x2 or y1 < y2 */ |
182 if (x1 > x2 || y1 > y2) { |
182 if (x1 > x2 || y1 > y2) { |
183 intswap(x1,x2); |
183 Swap(x1, x2); |
184 intswap(y1,y2); |
184 Swap(y1, y2); |
185 } |
185 } |
186 FOR_ALL_VEHICLES(veh) { |
186 FOR_ALL_VEHICLES(veh) { |
187 if (without_crashed && (veh->vehstatus & VS_CRASHED) != 0) continue; |
187 if (without_crashed && (veh->vehstatus & VS_CRASHED) != 0) continue; |
188 if ((veh->type == VEH_Train || veh->type == VEH_Road) && (z==0xFF || veh->z_pos == z)) { |
188 if ((veh->type == VEH_Train || veh->type == VEH_Road) && (z==0xFF || veh->z_pos == z)) { |
189 if ((veh->x_pos>>4) >= x1 && (veh->x_pos>>4) <= x2 && |
189 if ((veh->x_pos>>4) >= x1 && (veh->x_pos>>4) <= x2 && |