# HG changeset patch # User glx # Date 1197062198 0 # Node ID 135a60c84e952bae090cc1233d234cdb056fed16 # Parent 6cc607fe1d3d795e5193a8d593789e2c859d58fb (svn r11590) -Fix (r11193): IsSlopeRefused() result was half wrong diff -r 6cc607fe1d3d -r 135a60c84e95 src/industry_cmd.cpp --- a/src/industry_cmd.cpp Fri Dec 07 21:14:54 2007 +0000 +++ b/src/industry_cmd.cpp Fri Dec 07 21:16:38 2007 +0000 @@ -1184,14 +1184,14 @@ { if (IsSteepSlope(current)) return true; if (current != SLOPE_FLAT) { - if (refused & SLOPE_STEEP) return true; + if (IsSteepSlope(refused)) return true; Slope t = ComplementSlope(current); - if (refused & 1 && (t & SLOPE_NW)) return false; - if (refused & 2 && (t & SLOPE_NE)) return false; - if (refused & 4 && (t & SLOPE_SW)) return false; - if (refused & 8 && (t & SLOPE_SE)) return false; + if (refused & SLOPE_W && (t & SLOPE_NW)) return true; + if (refused & SLOPE_S && (t & SLOPE_NE)) return true; + if (refused & SLOPE_E && (t & SLOPE_SW)) return true; + if (refused & SLOPE_N && (t & SLOPE_SE)) return true; } return false;