(svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs.
This commit is contained in:
@@ -347,7 +347,7 @@ public:
|
||||
* @param direction the direction the vehicle is facing
|
||||
* @return the sprite for the given vehicle in the given direction
|
||||
*/
|
||||
virtual SpriteID GetImage(Direction direction) const { return 0; }
|
||||
virtual SpriteID GetImage(Direction direction, EngineImageType image_type) const { return 0; }
|
||||
|
||||
const GRFFile *GetGRF() const;
|
||||
uint32 GetGRFID() const;
|
||||
@@ -992,7 +992,7 @@ struct SpecializedVehicle : public Vehicle {
|
||||
* it gives ~3% runtime improvements in games with many vehicles */
|
||||
if (turned) ((T *)this)->T::UpdateDeltaXY(this->direction);
|
||||
SpriteID old_image = this->cur_image;
|
||||
this->cur_image = ((T *)this)->T::GetImage(this->direction);
|
||||
this->cur_image = ((T *)this)->T::GetImage(this->direction, EIT_ON_MAP);
|
||||
if (moved || this->cur_image != old_image) VehicleMove(this, true);
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user