summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2016-05-22 11:04:34 +0000
committerfrosch <frosch@openttd.org>2016-05-22 11:04:34 +0000
commitebb6e3807520cac80abac5441eb66403bd97c104 (patch)
treede44a429f8716e00592fcc0211c548c185632570 /src
parent8084f39bf332b14f4cb1424068849474e1b59cf9 (diff)
downloadopenttd-ebb6e3807520cac80abac5441eb66403bd97c104.tar.xz
(svn r27578) -Fix [FS#6454]: Vehicles could not be hidden from the purchase list when they were in exclusive preview.
Diffstat (limited to 'src')
-rw-r--r--src/engine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index f8fc0ee6a..9f9abcde0 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -879,7 +879,7 @@ CommandCost CmdSetVehicleVisibility(TileIndex tile, DoCommandFlag flags, uint32
{
Engine *e = Engine::GetIfValid(GB(p2, 0, 31));
if (e == NULL || _current_company >= MAX_COMPANIES) return CMD_ERROR;
- if ((e->flags & ENGINE_AVAILABLE) == 0 || !HasBit(e->company_avail, _current_company)) return CMD_ERROR;
+ if (!IsEngineBuildable(e->index, e->type, _current_company)) return CMD_ERROR;
if ((flags & DC_EXEC) != 0) {
SB(e->company_hidden, _current_company, 1, GB(p2, 31, 1));