mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
Fix incorrect vehicle alignment when entering bridge from W,N directions
This commit is contained in:
parent
a87720ca06
commit
1b9775479d
@ -3149,6 +3149,10 @@ bool TrainController(Train *v, Vehicle *nomove, bool reverse)
|
||||
goto invalid_rail;
|
||||
}
|
||||
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)) {
|
||||
/* Not inside tunnel */
|
||||
|
Loading…
Reference in New Issue
Block a user