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/vehicle_base.h | |
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/vehicle_base.h')
-rw-r--r-- | src/vehicle_base.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vehicle_base.h b/src/vehicle_base.h index fc40f22a6..73f499c48 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -366,9 +366,8 @@ public: /** * Updates the x and y offsets and the size of the sprite used * for this vehicle. - * @param direction the direction the vehicle is facing */ - virtual void UpdateDeltaXY(Direction direction) {} + virtual void UpdateDeltaXY() {} /** * Determines the effective direction-specific vehicle movement speed. @@ -1139,7 +1138,7 @@ struct SpecializedVehicle : public Vehicle { /* Explicitly choose method to call to prevent vtable dereference - * it gives ~3% runtime improvements in games with many vehicles */ - if (update_delta) ((T *)this)->T::UpdateDeltaXY(this->direction); + if (update_delta) ((T *)this)->T::UpdateDeltaXY(); VehicleSpriteSeq seq; ((T *)this)->T::GetImage(this->direction, EIT_ON_MAP, &seq); if (force_update || this->sprite_seq != seq) { |