Change: Remove direction parameter from Vehicle::UpdateDeltaXY. (#6792)
The value is either unused or always the same as this->direction.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user