(svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class

This commit is contained in:
rubidium
2014-09-20 15:31:26 +00:00
parent c4311903b7
commit 6c2abf0930
11 changed files with 81 additions and 87 deletions

View File

@@ -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();