Exclude virtual/template vehicles from vehicle ageing and news messages.
This commit is contained in:
@@ -1697,6 +1697,9 @@ bool Vehicle::HandleBreakdown()
|
|||||||
*/
|
*/
|
||||||
void AgeVehicle(Vehicle *v)
|
void AgeVehicle(Vehicle *v)
|
||||||
{
|
{
|
||||||
|
/* Stop if a virtual vehicle */
|
||||||
|
if (HasBit(v->subtype, GVSF_VIRTUAL)) return;
|
||||||
|
|
||||||
if (v->age < MAX_DAY) {
|
if (v->age < MAX_DAY) {
|
||||||
v->age++;
|
v->age++;
|
||||||
if (v->IsPrimaryVehicle() && v->age == VEHICLE_PROFIT_MIN_AGE + 1) GroupStatistics::VehicleReachedProfitAge(v);
|
if (v->IsPrimaryVehicle() && v->age == VEHICLE_PROFIT_MIN_AGE + 1) GroupStatistics::VehicleReachedProfitAge(v);
|
||||||
|
Reference in New Issue
Block a user