Fix incorrect vehicle alignment when entering bridge from W,N directions
This commit is contained in:
@@ -3149,6 +3149,10 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse)
|
|||||||
goto invalid_rail;
|
goto invalid_rail;
|
||||||
}
|
}
|
||||||
if (old_direction != v->direction) notify_direction_changed(old_direction, v->direction);
|
if (old_direction != v->direction) notify_direction_changed(old_direction, v->direction);
|
||||||
|
DiagDirection dir = GetTunnelBridgeDirection(gp.old_tile);
|
||||||
|
const byte *b = _initial_tile_subcoord[AxisToTrack(DiagDirToAxis(dir))][dir];
|
||||||
|
gp.x = (gp.x & ~0xF) | b[0];
|
||||||
|
gp.y = (gp.y & ~0xF) | b[1];
|
||||||
}
|
}
|
||||||
if (!(v->track & TRACK_BIT_WORMHOLE)) {
|
if (!(v->track & TRACK_BIT_WORMHOLE)) {
|
||||||
/* Not inside tunnel */
|
/* Not inside tunnel */
|
||||||
|
Reference in New Issue
Block a user