summaryrefslogtreecommitdiff
path: root/src/date.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/date.cpp')
-rw-r--r--src/date.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/date.cpp b/src/date.cpp
index 129460795..858c65119 100644
--- a/src/date.cpp
+++ b/src/date.cpp
@@ -184,10 +184,9 @@ static const Month _autosave_months[] = {
*/
static void RunVehicleDayProc(uint daytick)
{
- uint total = GetMaxVehicleIndex() + 1;
- uint i;
+ uint total = Vehicle::GetPoolSize();
- for (i = daytick; i < total; i += DAY_TICKS) {
+ for (uint i = daytick; i < total; i += DAY_TICKS) {
Vehicle *v = Vehicle::Get(i);
if (v->IsValid()) {