(svn r8896) -Fix

Most (i.e. 13 of 15) callers of GetNewVehiclePos() do not care for the return and the others can figure it out by inspecting the information returned in struct GetNewVehiclePosResult.
Therefore remove the return value.
This commit is contained in:
tron
2007-02-25 10:25:25 +00:00
parent 5d081ed350
commit 270e366772
4 changed files with 6 additions and 7 deletions

View File

@@ -2887,9 +2887,10 @@ static void TrainController(Vehicle *v, bool update_image)
BeginVehicleMove(v);
GetNewVehiclePosResult gp;
GetNewVehiclePos(v, &gp);
if (v->u.rail.track != TRACK_BIT_WORMHOLE) {
/* Not inside tunnel */
if (GetNewVehiclePos(v, &gp)) {
if (gp.old_tile == gp.new_tile) {
/* Staying in the old tile */
if (v->u.rail.track == TRACK_BIT_DEPOT) {
/* Inside depot */
@@ -3039,8 +3040,6 @@ static void TrainController(Vehicle *v, bool update_image)
}
} else {
/* In tunnel or on a bridge */
GetNewVehiclePos(v, &gp);
if (!(v->vehstatus & VS_HIDDEN)) {
v->cur_speed =
min(v->cur_speed, GetBridge(GetBridgeType(v->tile))->speed);