mirror of https://github.com/OpenTTD/OpenTTD
(svn r27578) -Fix [FS#6454]: Vehicles could not be hidden from the purchase list when they were in exclusive preview.
parent
8084f39bf3
commit
ebb6e38075
|
@ -879,7 +879,7 @@ CommandCost CmdSetVehicleVisibility(TileIndex tile, DoCommandFlag flags, uint32
|
||||||
{
|
{
|
||||||
Engine *e = Engine::GetIfValid(GB(p2, 0, 31));
|
Engine *e = Engine::GetIfValid(GB(p2, 0, 31));
|
||||||
if (e == NULL || _current_company >= MAX_COMPANIES) return CMD_ERROR;
|
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) {
|
if ((flags & DC_EXEC) != 0) {
|
||||||
SB(e->company_hidden, _current_company, 1, GB(p2, 31, 1));
|
SB(e->company_hidden, _current_company, 1, GB(p2, 31, 1));
|
||||||
|
|
Loading…
Reference in New Issue