(svn r22436) -Fix (r18969): Apply railtype property 12 (station graphics) also to station groundsprites from action 1.
This commit is contained in:
26
src/rail.h
26
src/rail.h
@@ -162,25 +162,15 @@ struct RailtypeInfo {
|
||||
/** bitmask to the OTHER railtypes on which an engine of THIS railtype can physically travel */
|
||||
RailTypes compatible_railtypes;
|
||||
|
||||
/**
|
||||
* Offset between the current railtype and normal rail. This means that:<p>
|
||||
* 1) All the sprites in a railset MUST be in the same order. This order
|
||||
* is determined by normal rail. Check sprites 1005 and following for this order<p>
|
||||
* 2) The position where the railtype is loaded must always be the same, otherwise
|
||||
* the offset will fail.
|
||||
* @note: Something more flexible might be desirable in the future.
|
||||
*/
|
||||
SpriteID total_offset;
|
||||
|
||||
/**
|
||||
* Bridge offset
|
||||
*/
|
||||
SpriteID bridge_offset;
|
||||
|
||||
/**
|
||||
* Offset to add to ground sprite when drawing custom waypoints / stations
|
||||
* Original railtype number to use when drawing non-newgrf railtypes, or when drawing stations.
|
||||
*/
|
||||
byte custom_ground_offset;
|
||||
byte fallback_railtype;
|
||||
|
||||
/**
|
||||
* Multiplier for curve maximum speed advantage
|
||||
@@ -251,6 +241,18 @@ struct RailtypeInfo {
|
||||
{
|
||||
return this->group[RTSG_GROUND] != NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset between the current railtype and normal rail. This means that:<p>
|
||||
* 1) All the sprites in a railset MUST be in the same order. This order
|
||||
* is determined by normal rail. Check sprites 1005 and following for this order<p>
|
||||
* 2) The position where the railtype is loaded must always be the same, otherwise
|
||||
* the offset will fail.
|
||||
*/
|
||||
inline uint GetRailtypeSpriteOffset() const
|
||||
{
|
||||
return 82 * this->fallback_railtype;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user