mirror of https://github.com/OpenTTD/OpenTTD
(svn r22151) [1.1] -Backport from trunk:
- Fix: Spectators had crashes when closing buoy windows (r22131) - Fix: Build-station-window showed wrong selection when reopening [FS#4530] (r22128) - Fix: Canals would get drawn as land in the smallmap when using the owner window (r22127) - Fix: The animation-ness of two goldmine tiles were swapped, causing the wheeltower to not work properly, and the bottom corner to show the wrong sprite [FS#4528] (r22125) - Fix: CommandQueue::Pop() did not update 'last'; popping the last item caused the queue to disconnect unless there was only one item [FS#4522] (r22123)release/1.1
parent
cad2aa6b14
commit
f2d2713f05
|
@ -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--;
|
||||
}
|
||||
|
|
|
@ -1004,7 +1004,7 @@ public:
|
|||
NWidgetMatrix *matrix = this->GetWidget<NWidgetMatrix>(BRSW_MATRIX);
|
||||
matrix->SetScrollbar(this->vscroll2);
|
||||
matrix->SetCount(_railstation.station_count);
|
||||
matrix->SetClicked(0);
|
||||
matrix->SetClicked(_railstation.station_type);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue