summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-09-20 15:31:26 +0000
committerrubidium <rubidium@openttd.org>2014-09-20 15:31:26 +0000
commit6c2abf0930c23e7da82a892fb37c97786c245c00 (patch)
tree13db191cf49b57df14fdbf2c71ce558bbda57f6a /src/roadveh_cmd.cpp
parentc4311903b71345a9c5ad0e5271ed722d71994c9e (diff)
downloadopenttd-6c2abf0930c23e7da82a892fb37c97786c245c00.tar.xz
(svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index b3310af10..4e034b1f4 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -329,7 +329,7 @@ CommandCost CmdBuildRoadVehicle(TileIndex tile, DoCommandFlag flags, const Engin
/* Initialize cached values for realistic acceleration. */
if (_settings_game.vehicle.roadveh_acceleration_model != AM_ORIGINAL) v->CargoChanged();
- VehicleUpdatePosition(v);
+ v->UpdatePosition();
CheckConsistencyOfArticulatedVehicle(v);
}
@@ -1017,7 +1017,7 @@ static bool RoadVehLeaveDepot(RoadVehicle *v, bool first)
v->x_pos = x;
v->y_pos = y;
- VehicleUpdatePosition(v);
+ v->UpdatePosition();
v->UpdateInclination(true, true);
InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
@@ -1146,15 +1146,15 @@ bool IndividualRoadVehicleController(RoadVehicle *v, const RoadVehicle *prev)
/* Vehicle has just entered a bridge or tunnel */
v->x_pos = gp.x;
v->y_pos = gp.y;
- VehicleUpdatePosition(v);
+ v->UpdatePosition();
v->UpdateInclination(true, true);
return true;
}
v->x_pos = gp.x;
v->y_pos = gp.y;
- VehicleUpdatePosition(v);
- if ((v->vehstatus & VS_HIDDEN) == 0) VehicleUpdateViewport(v, true);
+ v->UpdatePosition();
+ if ((v->vehstatus & VS_HIDDEN) == 0) v->Vehicle::UpdateViewport(true);
return true;
}
@@ -1303,7 +1303,7 @@ again:
}
v->x_pos = x;
v->y_pos = y;
- VehicleUpdatePosition(v);
+ v->UpdatePosition();
RoadZPosAffectSpeed(v, v->UpdateInclination(true, true));
return true;
}
@@ -1369,7 +1369,7 @@ again:
v->x_pos = x;
v->y_pos = y;
- VehicleUpdatePosition(v);
+ v->UpdatePosition();
RoadZPosAffectSpeed(v, v->UpdateInclination(true, true));
return true;
}
@@ -1457,7 +1457,7 @@ again:
v->frame++;
v->x_pos = x;
v->y_pos = y;
- VehicleUpdatePosition(v);
+ v->UpdatePosition();
RoadZPosAffectSpeed(v, v->UpdateInclination(true, false));
return true;
}
@@ -1506,7 +1506,7 @@ again:
if (!HasBit(r, VETS_ENTERED_WORMHOLE)) v->frame++;
v->x_pos = x;
v->y_pos = y;
- VehicleUpdatePosition(v);
+ v->UpdatePosition();
RoadZPosAffectSpeed(v, v->UpdateInclination(false, true));
return true;
}