@@ -2353,13 +2353,13 @@ static void CalcRaildirsDrawstyle(TileHi
* based on whether we are left or right from it. */
b = dx < dy ? HT_LINE | HT_DIR_VL : HT_LINE | HT_DIR_VR;
/* Calculate where a vertical line through the start point and
* a horizontal line from the selected end point intersect and
* use that point as the end point. */
int offset = (raw_dx + raw_dy + TILE_SIZE) / 2;
int offset = (raw_dx + raw_dy + (int)TILE_SIZE) / 2;
x = thd->selstart.x - (offset & ~TILE_UNIT_MASK);
y = thd->selstart.y - (offset & ~TILE_UNIT_MASK);
/* 'Build' the last half rail tile if needed */
if ((offset & TILE_UNIT_MASK) > (TILE_SIZE / 2)) {
if (dx - dy < 0) {
Status change: