(svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user