summaryrefslogtreecommitdiff
path: root/src/date.cpp
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-02-07 19:10:19 +0000
committerbjarni <bjarni@openttd.org>2007-02-07 19:10:19 +0000
commitd40886903d7477a0f901f1ce0eaed9daa3b9d607 (patch)
treeb16bae58b03b0c68fe0ab88a8311dd7f6406238a /src/date.cpp
parent022e11d4219c644d3c4fa79931ca0b839d9b07e2 (diff)
downloadopenttd-d40886903d7477a0f901f1ce0eaed9daa3b9d607.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/date.cpp')
-rw-r--r--src/date.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/date.cpp b/src/date.cpp
index 856ca4528..8210abc56 100644
--- a/src/date.cpp
+++ b/src/date.cpp
@@ -215,7 +215,7 @@ static void RunVehicleDayProc(uint daytick)
for (i = daytick; i < total; i += DAY_TICKS) {
Vehicle *v = GetVehicle(i);
- if (IsValidVehicle(v)) _on_new_vehicle_day_proc[v->type - 0x10](v);
+ if (IsValidVehicle(v)) _on_new_vehicle_day_proc[v->type](v);
}
}