Changeset - r23513:02bc46fca78d
[Not reviewed]
master
0 1 0
stormcone - 5 years ago 2019-03-23 16:40:01
48624099+stormcone@users.noreply.github.com
Change: Do not display a newspaper about old vehicles for which replacement is activated.
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -1348,8 +1348,11 @@ void AgeVehicle(Vehicle *v)
 
	/* Don't warn about non-primary or not ours vehicles or vehicles that are crashed */
 
	if (v->Previous() != NULL || v->owner != _local_company || (v->vehstatus & VS_CRASHED) != 0) return;
 

	
 
	const Company *c = Company::Get(v->owner);
 
	/* Don't warn if a renew is active */
 
	if (Company::Get(v->owner)->settings.engine_renew && v->GetEngine()->company_avail != 0) return;
 
	if (c->settings.engine_renew && v->GetEngine()->company_avail != 0) return;
 
	/* Don't warn if a replacement is active */
 
	if (EngineHasReplacementForCompany(c, v->engine_type, v->group_id)) return;
 

	
 
	StringID str;
 
	if (age == -DAYS_IN_LEAP_YEAR) {
0 comments (0 inline, 0 general)