mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-29 01:19:11 +00:00
(svn r13078) -Fix: group gui used the vehicle type before it was actually set.
This commit is contained in:
@@ -190,6 +190,7 @@ struct VehicleGroupWindow : public Window, public VehicleListBase {
|
|||||||
VehicleGroupWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
VehicleGroupWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
|
||||||
{
|
{
|
||||||
const PlayerID owner = (PlayerID)GB(this->window_number, 0, 8);
|
const PlayerID owner = (PlayerID)GB(this->window_number, 0, 8);
|
||||||
|
this->vehicle_type = (VehicleType)GB(this->window_number, 11, 5);
|
||||||
|
|
||||||
this->caption_color = owner;
|
this->caption_color = owner;
|
||||||
this->hscroll.cap = 224;
|
this->hscroll.cap = 224;
|
||||||
@@ -222,8 +223,6 @@ struct VehicleGroupWindow : public Window, public VehicleListBase {
|
|||||||
case VEH_AIRCRAFT: this->sorting = &_sorting.aircraft; break;
|
case VEH_AIRCRAFT: this->sorting = &_sorting.aircraft; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->vehicle_type = (VehicleType)GB(this->window_number, 11, 5);
|
|
||||||
|
|
||||||
this->vehicles.sort_list = NULL;
|
this->vehicles.sort_list = NULL;
|
||||||
this->vehicles.sort_type = this->sorting->criteria;
|
this->vehicles.sort_type = this->sorting->criteria;
|
||||||
this->vehicles.flags = VL_REBUILD | (this->sorting->order ? VL_DESC : VL_NONE);
|
this->vehicles.flags = VL_REBUILD | (this->sorting->order ? VL_DESC : VL_NONE);
|
||||||
|
Reference in New Issue
Block a user