(svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class
This commit is contained in:
@@ -625,8 +625,8 @@ static void ShipController(Ship *v)
|
||||
if (!IsTileType(gp.new_tile, MP_TUNNELBRIDGE) || !HasBit(VehicleEnterTile(v, gp.new_tile, gp.x, gp.y), VETS_ENTERED_WORMHOLE)) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -638,7 +638,7 @@ static void ShipController(Ship *v)
|
||||
v->z_pos = GetSlopePixelZ(gp.x, gp.y);
|
||||
|
||||
getout:
|
||||
VehicleUpdatePosition(v);
|
||||
v->UpdatePosition();
|
||||
v->UpdateViewport(true, true);
|
||||
return;
|
||||
|
||||
@@ -722,7 +722,7 @@ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, const Engine *e, u
|
||||
|
||||
v->InvalidateNewGRFCacheOfChain();
|
||||
|
||||
VehicleUpdatePosition(v);
|
||||
v->UpdatePosition();
|
||||
}
|
||||
|
||||
return CommandCost();
|
||||
|
Reference in New Issue
Block a user