diff options
author | PeterN <peter@fuzzle.org> | 2018-05-22 18:43:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-22 18:43:34 +0100 |
commit | a07394a63a67e13db4cd583796ebc8e009082944 (patch) | |
tree | 19afa5ffe450b7e0ef908fde114326aa34de249d /src/ship_cmd.cpp | |
parent | 4cebebcf683b079ff010e70b0a0a78c12734933e (diff) | |
download | openttd-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.cpp | 6 |
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; |