summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2012-01-02 13:44:37 +0000
committertruebrain <truebrain@openttd.org>2012-01-02 13:44:37 +0000
commit091bc25a90bb68118f7dbd0e4d750de266cbf855 (patch)
tree77aaea1eca3aa6705991e37d915c3e0aa5e4ce44 /src/roadveh_cmd.cpp
parent0d929e877faf9572a80803db382ab973702e02c0 (diff)
downloadopenttd-091bc25a90bb68118f7dbd0e4d750de266cbf855.tar.xz
(svn r23714) -Codechange: don't mix Viewport with non-viewport code
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 75eea8b45..e298dca49 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -987,6 +987,7 @@ static bool RoadVehLeaveDepot(RoadVehicle *v, bool first)
v->x_pos = x;
v->y_pos = y;
+ VehicleUpdatePosition(v);
v->UpdateInclination(true, true);
InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
@@ -1121,6 +1122,7 @@ static bool IndividualRoadVehicleController(RoadVehicle *v, const RoadVehicle *p
/* Vehicle has just entered a bridge or tunnel */
v->x_pos = gp.x;
v->y_pos = gp.y;
+ VehicleUpdatePosition(v);
v->UpdateInclination(true, true);
return true;
}
@@ -1277,6 +1279,7 @@ again:
}
v->x_pos = x;
v->y_pos = y;
+ VehicleUpdatePosition(v);
RoadZPosAffectSpeed(v, v->UpdateInclination(true, true));
return true;
}
@@ -1342,6 +1345,7 @@ again:
v->x_pos = x;
v->y_pos = y;
+ VehicleUpdatePosition(v);
RoadZPosAffectSpeed(v, v->UpdateInclination(true, true));
return true;
}
@@ -1430,6 +1434,7 @@ again:
v->frame++;
v->x_pos = x;
v->y_pos = y;
+ VehicleUpdatePosition(v);
RoadZPosAffectSpeed(v, v->UpdateInclination(true, false));
return true;
}
@@ -1478,6 +1483,7 @@ again:
if (!HasBit(r, VETS_ENTERED_WORMHOLE)) v->frame++;
v->x_pos = x;
v->y_pos = y;
+ VehicleUpdatePosition(v);
RoadZPosAffectSpeed(v, v->UpdateInclination(false, true));
return true;
}