(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:
michi_cc
2011-11-21 20:51:43 +00:00
parent c9782d4e56
commit 3b45b41e68
10 changed files with 230 additions and 59 deletions

View File

@@ -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 */