From fef64185b87e4517b7760e017171d646eaa1eb69 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 14 Sep 2007 22:27:40 +0000 Subject: (svn r11107) -Feature: some tool so one can still build tunnels under rails (and other structures) when the owner of the structure built it on foundations and if you have enough "empty" space ofcourse. One could use the tool for some other construction needs too. Patch by frosch. --- src/slope.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/slope.h') diff --git a/src/slope.h b/src/slope.h index 0ed1c452c..dd04c24be 100644 --- a/src/slope.h +++ b/src/slope.h @@ -90,6 +90,19 @@ static inline byte GetHighestSlopeCorner(Slope s) } } +/** + * Returns the height of the highest corner of a slope relative to TileZ (= minimal height) + * + * @param s The #Slope. + * @return Relative height of highest corner. + */ +static inline uint GetSlopeMaxZ(Slope s) +{ + if (s == SLOPE_FLAT) return 0; + if (IsSteepSlope(s)) return 2 * TILE_HEIGHT; + return TILE_HEIGHT; +} + /** * Enumeration for Foundations. -- cgit v1.2.3-70-g09d2