diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp index 8e1fa077b5..d68021205a 100644 --- a/src/network/network_command.cpp +++ b/src/network/network_command.cpp @@ -81,13 +81,16 @@ CommandPacket *CommandQueue::Pop(bool ignore_paused) { CommandPacket **prev = &this->first; CommandPacket *ret = this->first; + CommandPacket *prev_item = NULL; if (ignore_paused && _pause_mode != PM_UNPAUSED) { while (ret != NULL && !IsCommandAllowedWhilePaused(ret->cmd)) { + prev_item = ret; prev = &ret->next; ret = ret->next; } } if (ret != NULL) { + if (ret == this->last) this->last = prev_item; *prev = ret->next; this->count--; } diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 4503a29f2a..2b391218b6 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -1004,7 +1004,7 @@ public: NWidgetMatrix *matrix = this->GetWidget(BRSW_MATRIX); matrix->SetScrollbar(this->vscroll2); matrix->SetCount(_railstation.station_count); - matrix->SetClicked(0); + matrix->SetClicked(_railstation.station_type); } } diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 7cc9f540f7..b7bcd9c20c 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -542,11 +542,10 @@ static inline uint32 GetSmallMapOwnerPixels(TileIndex tile, TileType t) */ } - if ((o < MAX_COMPANIES && !_legend_land_owners[_company_to_list_pos[o]].show_on_map) || o == OWNER_NONE) { + if ((o < MAX_COMPANIES && !_legend_land_owners[_company_to_list_pos[o]].show_on_map) || o == OWNER_NONE || o == OWNER_WATER) { + if (t == MP_WATER) return MKCOLOUR(0xCACACACA); const SmallMapColourScheme *cs = &_heightmap_schemes[_settings_client.gui.smallmap_land_colour]; return _smallmap_show_heightmap ? cs->height_colours[TileHeight(tile)] : cs->default_colour; - } else if (o == OWNER_WATER) { - return MKCOLOUR(0xCACACACA); } else if (o == OWNER_TOWN) { return MKCOLOUR(0xB4B4B4B4); } diff --git a/src/table/build_industry.h b/src/table/build_industry.h index f7e9708ab7..940c656e77 100644 --- a/src/table/build_industry.h +++ b/src/table/build_industry.h @@ -1701,8 +1701,8 @@ static const IndustryTileSpec _origin_industry_tile_specs[NEW_INDUSTRYTILEOFFSET MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false), MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false), MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false), - MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, true ), MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false), + MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, true), /* Bank Sub Arctic */ MT(0, CT_INVALID, 8, CT_GOLD, 0, CT_INVALID, SLOPE_E, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false), diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp index f050b3c268..23c9781e33 100644 --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -79,8 +79,12 @@ public: ~WaypointWindow() { Owner owner = this->owner; + + /* Buoys have no owner and can be used by everyone. Show only 'our' vehicles */ if (!Company::IsValidID(owner)) owner = _local_company; - DeleteWindowById(GetWindowClassForVehicleType(this->vt), VehicleListIdentifier(VL_STATION_LIST, this->vt, owner, this->window_number).Pack(), false); + + /* Well, spectators otoh */ + if (Company::IsValidID(owner)) DeleteWindowById(GetWindowClassForVehicleType(this->vt), VehicleListIdentifier(VL_STATION_LIST, this->vt, owner, this->window_number).Pack(), false); } virtual void SetStringParameters(int widget) const