summaryrefslogtreecommitdiff
path: root/road_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-06 13:11:08 +0000
committertron <tron@openttd.org>2006-03-06 13:11:08 +0000
commitf3fb21c96cd447fd2efeaf085d28bac9588649c7 (patch)
tree7384488cf17eb4d93ce21ad3b40437978efc939a /road_gui.c
parentd79329277897c59f86a6a914af53fdc50d90852c (diff)
downloadopenttd-f3fb21c96cd447fd2efeaf085d28bac9588649c7.tar.xz
(svn r3773) Shove some semantics down ottd's throat by replacing ints and magic numbers by enums and some related changes
Diffstat (limited to 'road_gui.c')
-rw-r--r--road_gui.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/road_gui.c b/road_gui.c
index 40096a474..a339e528a 100644
--- a/road_gui.c
+++ b/road_gui.c
@@ -2,6 +2,7 @@
#include "stdafx.h"
#include "openttd.h"
+#include "road_map.h"
#include "table/sprites.h"
#include "table/strings.h"
#include "functions.h"
@@ -72,7 +73,7 @@ static void BuildRoadOutsideStation(TileIndex tile, int direction)
static const byte _roadbits_by_dir[4] = {2,1,8,4};
tile += TileOffsByDir(direction);
// if there is a roadpiece just outside of the station entrance, build a connecting route
- if (IsTileType(tile, MP_STREET) && !(_m[tile].m5 & 0x20)) {
+ if (IsTileType(tile, MP_STREET) && GetRoadType(tile) == ROAD_NORMAL) {
DoCommandP(tile, _roadbits_by_dir[direction], 0, NULL, CMD_BUILD_ROAD);
}
}