(svn r23290) -Fix [FS#2379,FS#3569]: Change the centre of train vehicles to depend on the vehicle length instead of being fixed at 4/8th of the original vehicle length to make sure shortened vehicles don't block tiles they shouldn't block.
This commit is contained in:
@@ -239,4 +239,15 @@ static inline bool IsValidAxis(Axis d)
|
||||
return d < AXIS_END;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a given Direction is diagonal.
|
||||
*
|
||||
* @param dir The given direction.
|
||||
* @return True if the direction is diagonal.
|
||||
*/
|
||||
static inline bool IsDiagonalDirection(Direction dir)
|
||||
{
|
||||
return (dir & 1) != 0;
|
||||
}
|
||||
|
||||
#endif /* DIRECTION_FUNC_H */
|
||||
|
Reference in New Issue
Block a user