summaryrefslogtreecommitdiff
path: root/src/ship_cmd.cpp
diff options
context:
space:
mode:
authorPeterN <peter@fuzzle.org>2018-05-22 18:43:34 +0100
committerGitHub <noreply@github.com>2018-05-22 18:43:34 +0100
commita07394a63a67e13db4cd583796ebc8e009082944 (patch)
tree19afa5ffe450b7e0ef908fde114326aa34de249d /src/ship_cmd.cpp
parent4cebebcf683b079ff010e70b0a0a78c12734933e (diff)
downloadopenttd-a07394a63a67e13db4cd583796ebc8e009082944.tar.xz
Change: Remove direction parameter from Vehicle::UpdateDeltaXY. (#6792)
The value is either unused or always the same as this->direction.
Diffstat (limited to 'src/ship_cmd.cpp')
-rw-r--r--src/ship_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index 771863a24..967cd4e1d 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -296,7 +296,7 @@ TileIndex Ship::GetOrderStationLocation(StationID station)
}
}
-void Ship::UpdateDeltaXY(Direction direction)
+void Ship::UpdateDeltaXY()
{
static const int8 _delta_xy_table[8][4] = {
/* y_extent, x_extent, y_offs, x_offs */
@@ -310,7 +310,7 @@ void Ship::UpdateDeltaXY(Direction direction)
{32, 6, -16, -3}, // NW
};
- const int8 *bb = _delta_xy_table[direction];
+ const int8 *bb = _delta_xy_table[this->direction];
this->x_offs = bb[3];
this->y_offs = bb[2];
this->x_extent = bb[1];
@@ -670,7 +670,7 @@ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, const Engine *e, u
v->y_pos = y;
v->z_pos = GetSlopePixelZ(x, y);
- v->UpdateDeltaXY(v->direction);
+ v->UpdateDeltaXY();
v->vehstatus = VS_HIDDEN | VS_STOPPED | VS_DEFPAL;
v->spritenum = svi->image_index;