(svn r11407) -Fix: do not allow building of tram-tracks when they are not available (SmatZ)

This commit is contained in:
truelight
2007-11-11 12:34:44 +00:00
parent fe24593692
commit 8b3e278897
5 changed files with 41 additions and 11 deletions

View File

@@ -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;
}