diff options
author | bjarni <bjarni@openttd.org> | 2007-02-07 19:10:19 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2007-02-07 19:10:19 +0000 |
commit | 037d6367349afa5a27ddf2cf015f6490167cf786 (patch) | |
tree | b16bae58b03b0c68fe0ab88a8311dd7f6406238a /src/vehicle_gui.cpp | |
parent | 5666d8d7272ff24116049757dc2405b55cfd4b97 (diff) | |
download | openttd-037d6367349afa5a27ddf2cf015f6490167cf786.tar.xz |
(svn r8621) -Codechange: assigned new numbers to the VEH_(type) enum so that VEH_Train is 0, VEH_Road is 1 and so on
This means that "v->type" can be used as array indexes instead of VehTypeToIndex() (or "v->type - VEH_Train/0x10 as the code still used in some places)
Surprisingly this can be done without changing the savegame format
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 9ee47a19b..25c7a54ab 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1132,7 +1132,7 @@ void PlayerVehWndProc(Window *w, WindowEvent *e) }; /* XXX - Substite string since the dropdown cannot handle dynamic strings */ - action_str[2] = depot_name[vl->vehicle_type - VEH_Train]; + action_str[2] = depot_name[vl->vehicle_type]; ShowDropDownMenu(w, action_str, 0, VLW_WIDGET_MANAGE_VEHICLES_DROPDOWN, 0, 0); break; } |