summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-13 21:50:31 +0000
committerrubidium <rubidium@openttd.org>2008-05-13 21:50:31 +0000
commitcf91f6bf3e6db20eda745703a0b10e37012366ad (patch)
tree5e2d426600397fc5e1848b7c300a801f859bafb6 /src
parenta9cc9879299ab5a67e6a4111718dbd22910af1ea (diff)
downloadopenttd-cf91f6bf3e6db20eda745703a0b10e37012366ad.tar.xz
(svn r13078) -Fix: group gui used the vehicle type before it was actually set.
Diffstat (limited to 'src')
-rw-r--r--src/group_gui.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index 8ead8cb54..ecdc535e2 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -190,6 +190,7 @@ struct VehicleGroupWindow : public Window, public VehicleListBase {
VehicleGroupWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
{
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->hscroll.cap = 224;
@@ -222,8 +223,6 @@ struct VehicleGroupWindow : public Window, public VehicleListBase {
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_type = this->sorting->criteria;
this->vehicles.flags = VL_REBUILD | (this->sorting->order ? VL_DESC : VL_NONE);