From 037d6367349afa5a27ddf2cf015f6490167cf786 Mon Sep 17 00:00:00 2001 From: bjarni Date: Wed, 7 Feb 2007 19:10:19 +0000 Subject: (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 --- src/economy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/economy.cpp') diff --git a/src/economy.cpp b/src/economy.cpp index 99fbdb09b..b97e8df55 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1503,7 +1503,7 @@ int LoadUnloadVehicle(Vehicle *v, bool just_arrived) * on the vehicle type - the values here are those found in TTDPatch */ uint gradual_loading_wait_time[] = { 40, 20, 10, 20 }; - unloading_time = gradual_loading_wait_time[v->type - VEH_Train]; + unloading_time = gradual_loading_wait_time[v->type]; if (HASBIT(v->load_status, LS_LOADING_FINISHED)) { if (anything_loaded) { unloading_time += 20; -- cgit v1.2.3-70-g09d2