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/roadveh_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/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index fcabf477f..7d0007fd2 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -403,7 +403,7 @@ void RoadVehicle::MarkDirty() this->CargoChanged(); } -void RoadVehicle::UpdateDeltaXY(Direction direction) +void RoadVehicle::UpdateDeltaXY() { static const int8 _delta_xy_table[8][10] = { /* y_extent, x_extent, y_offs, x_offs, y_bb_offs, x_bb_offs, y_extent_shorten, x_extent_shorten, y_bb_offs_shorten, x_bb_offs_shorten */ @@ -418,9 +418,9 @@ void RoadVehicle::UpdateDeltaXY(Direction direction) }; int shorten = VEHICLE_LENGTH - this->gcache.cached_veh_length; - if (!IsDiagonalDirection(direction)) shorten >>= 1; + if (!IsDiagonalDirection(this->direction)) shorten >>= 1; - const int8 *bb = _delta_xy_table[direction]; + const int8 *bb = _delta_xy_table[this->direction]; this->x_bb_offs = bb[5] + bb[9] * shorten; this->y_bb_offs = bb[4] + bb[8] * shorten;; this->x_offs = bb[3]; |