Exclude virtual/template vehicles from vehicle ageing and news messages.

This commit is contained in:
Jonathan G Rennison
2016-12-18 00:41:40 +00:00
parent f80bebae7c
commit 09188e30f9

View File

@@ -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);