1
0
Fork 0

(svn r10383) [0.5] -Fix (r10373, FS#958): v->z_pos was wrong for trains on bridge

release/0.5
glx 2007-06-29 00:26:10 +00:00
parent fe8bb8da91
commit b0e8d229ee
1 changed files with 4 additions and 0 deletions

View File

@ -2749,7 +2749,11 @@ static void TrainEnterStation(Vehicle *v, StationID station)
static byte AfterSetTrainPos(Vehicle *v, bool new_tile)
{
byte old_z = v->z_pos;
/* need this hint so it returns the right z coordinate on bridges. */
_get_z_hint = old_z;
v->z_pos = GetSlopeZ(v->x_pos, v->y_pos);
_get_z_hint = 0;
if (new_tile) {
CLRBIT(v->u.rail.flags, VRF_GOINGUP);