summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2012-01-02 13:44:30 +0000
committertruebrain <truebrain@openttd.org>2012-01-02 13:44:30 +0000
commit0d929e877faf9572a80803db382ab973702e02c0 (patch)
treef19cea6421726b0719b1cfc7c403a8ac6262bc60 /src/aircraft_cmd.cpp
parent19004a77f843fccd0850cc980dd2c80de6d81462 (diff)
downloadopenttd-0d929e877faf9572a80803db382ab973702e02c0.tar.xz
(svn r23713) -Codechange: split VehicleMove() into two functions, to minimalize the work done where possible
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 6581e3800..15d151d0c 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -314,8 +314,8 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
UpdateAircraftCache(v, true);
- VehicleMove(v, false);
- VehicleMove(u, false);
+ VehicleUpdatePosition(v);
+ VehicleUpdatePosition(u);
/* Aircraft with 3 vehicles (chopper)? */
if (v->subtype == AIR_HELICOPTER) {
@@ -336,7 +336,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
w->UpdateDeltaXY(INVALID_DIR);
u->SetNext(w);
- VehicleMove(w, false);
+ VehicleUpdatePosition(w);
}
}
@@ -464,7 +464,7 @@ static void HelicopterTickHandler(Aircraft *v)
u->cur_image = img;
- VehicleMove(u, true);
+ VehicleUpdatePositionAndViewport(u);
}
/**
@@ -494,7 +494,7 @@ void SetAircraftPosition(Aircraft *v, int x, int y, int z)
u->z_pos = GetSlopePixelZ(safe_x, safe_y);
u->cur_image = v->cur_image;
- VehicleMove(u, true);
+ VehicleUpdatePositionAndViewport(u);
u = u->Next();
if (u != NULL) {
@@ -502,7 +502,7 @@ void SetAircraftPosition(Aircraft *v, int x, int y, int z)
u->y_pos = y;
u->z_pos = z + ROTOR_Z_OFFSET;
- VehicleMove(u, true);
+ VehicleUpdatePositionAndViewport(u);
}
}