summaryrefslogtreecommitdiff
path: root/town_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-02-23 12:24:19 +0000
committertron <tron@openttd.org>2006-02-23 12:24:19 +0000
commitb26d54585f5867a91b7119df83509398fc650f02 (patch)
treef5ac06f102968f6cf3cbe40e0fca7d7a55514d1b /town_cmd.c
parenta975616303292c5762a256a66aa24ff707614cc1 (diff)
downloadopenttd-b26d54585f5867a91b7119df83509398fc650f02.tar.xz
(svn r3660) Convert further road bits and type references to the functions/enums
Diffstat (limited to 'town_cmd.c')
-rw-r--r--town_cmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/town_cmd.c b/town_cmd.c
index f4b14909f..1d957a39e 100644
--- a/town_cmd.c
+++ b/town_cmd.c
@@ -4,6 +4,7 @@
#include "openttd.h"
#include "functions.h"
#include "strings.h"
+#include "road.h"
#include "table/strings.h"
#include "table/sprites.h"
#include "map.h"
@@ -489,7 +490,7 @@ static bool IsRoadAllowedHere(TileIndex tile, int dir)
// No, try to build one in the direction.
// if that fails clear the land, and if that fails exit.
// This is to make sure that we can build a road here later.
- if (CmdFailed(DoCommandByTile(tile, (dir&1)?0xA:0x5, 0, DC_AUTO, CMD_BUILD_ROAD)) &&
+ if (CmdFailed(DoCommandByTile(tile, (dir & 1 ? ROAD_X : ROAD_Y), 0, DC_AUTO, CMD_BUILD_ROAD)) &&
CmdFailed(DoCommandByTile(tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR)))
return false;
}