(svn r11201) -Fix [FS#1283]: minor issue with building one way roads one tile long. Patch by SmatZ.
authorrubidium
Thu, 04 Oct 2007 20:20:23 +0000
changeset 8166 074d00278f8c
parent 8165 606d97bce909
child 8167 eac4f5b693bc
(svn r11201) -Fix [FS#1283]: minor issue with building one way roads one tile long. Patch by SmatZ.
src/road_cmd.cpp
--- a/src/road_cmd.cpp	Thu Oct 04 20:16:35 2007 +0000
+++ b/src/road_cmd.cpp	Thu Oct 04 20:20:23 2007 +0000
@@ -653,7 +653,7 @@
 	/* On the X-axis, we have to swap the initial bits, so they
 	 * will be interpreted correctly in the GTTS. Futhermore
 	 * when you just 'click' on one tile to build them. */
-	if (HASBIT(p2, 2) == (start_tile == end_tile)) drd ^= DRD_BOTH;
+	if (HASBIT(p2, 2) == (start_tile == end_tile && HASBIT(p2, 0) == HASBIT(p2, 1))) drd ^= DRD_BOTH;
 	/* No disallowed direction bits have to be toggled */
 	if (!HASBIT(p2, 5)) drd = DRD_NONE;