summaryrefslogtreecommitdiff
path: root/src/main_gui.cpp
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-11-11 12:34:44 +0000
committertruelight <truelight@openttd.org>2007-11-11 12:34:44 +0000
commit8b3e27889784eaae5989ad0271c80b05b94edf46 (patch)
tree51f2c720480f1f4ac394177cbcecc18027d93e51 /src/main_gui.cpp
parentfe24593692bc6560dffca1d33db98f1a3bec805a (diff)
downloadopenttd-8b3e27889784eaae5989ad0271c80b05b94edf46.tar.xz
(svn r11407) -Fix: do not allow building of tram-tracks when they are not available (SmatZ)
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r--src/main_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 77a1acdb1..258ee09f6 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -19,6 +19,7 @@
#include "viewport.h"
#include "gfx.h"
#include "player.h"
+#include "road.h"
#include "command.h"
#include "news.h"
#include "town.h"
@@ -930,7 +931,7 @@ static void ToolbarBuildRoadClick(Window *w)
{
const Player *p = GetPlayer(_local_player);
/* The standard road button is *always* available */
- Window *w2 = PopupMainToolbMenu(w, 20, STR_180A_ROAD_CONSTRUCTION, 2, ~(p->avail_roadtypes | 1));
+ Window *w2 = PopupMainToolbMenu(w, 20, STR_180A_ROAD_CONSTRUCTION, 2, ~(p->avail_roadtypes | ROADTYPES_ROAD));
WP(w2, menu_d).sel_index = _last_built_roadtype;
}