train_cmd.c
branch0.4
changeset 10012 dddbb8033ba3
parent 9989 56cc28c68fb6
child 10013 b6dc91f0cd71
equal deleted inserted replaced
10011:66a5c07b4bae 10012:dddbb8033ba3
  2578 			if ((_m[tile].m5 & 0xC0) == 0xC0) { // is bridge middle part?
  2578 			if ((_m[tile].m5 & 0xC0) == 0xC0) { // is bridge middle part?
  2579 				uint height;
  2579 				uint height;
  2580 				uint tileh = GetTileSlope(tile, &height);
  2580 				uint tileh = GetTileSlope(tile, &height);
  2581 
  2581 
  2582 				// correct Z position of a train going under a bridge on slopes
  2582 				// correct Z position of a train going under a bridge on slopes
  2583 				if (CorrectZ(tileh)) height += 8;
  2583 				if (tileh != 0) height += TILE_HEIGHT;
  2584 
  2584 
  2585 				if (v->z_pos != height) return true; // train is going over bridge
  2585 				if (v->z_pos > height) return true; // train is going over bridge
  2586 			}
  2586 			}
  2587 			break;
  2587 			break;
  2588 
  2588 
  2589 		case MP_STREET:
  2589 		case MP_STREET:
  2590 			// tracks over roads, do owner check of tracks
  2590 			// tracks over roads, do owner check of tracks