From 09188e30f95c12e6392a324ef57a25b7c95f49e5 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 18 Dec 2016 00:41:40 +0000 Subject: [PATCH] Exclude virtual/template vehicles from vehicle ageing and news messages. --- src/vehicle.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vehicle.cpp b/src/vehicle.cpp index f0a0b719c6..fdd6533fb8 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1697,6 +1697,9 @@ bool Vehicle::HandleBreakdown() */ void AgeVehicle(Vehicle *v) { + /* Stop if a virtual vehicle */ + if (HasBit(v->subtype, GVSF_VIRTUAL)) return; + if (v->age < MAX_DAY) { v->age++; if (v->IsPrimaryVehicle() && v->age == VEHICLE_PROFIT_MIN_AGE + 1) GroupStatistics::VehicleReachedProfitAge(v);