Changeset - r26133:9ab8d1638bf3
[Not reviewed]
master
0 1 0
Tyler Trahan - 2 years ago 2021-11-26 23:35:54
tyler@tylertrahan.com
Fix: Suppress vehicle age warnings for stopped vehicles
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -1392,8 +1392,8 @@ void AgeVehicle(Vehicle *v)
 

	
 
	SetWindowDirty(WC_VEHICLE_DETAILS, v->index);
 

	
 
	/* Don't warn about non-primary or not ours vehicles or vehicles that are crashed */
 
	if (v->Previous() != nullptr || v->owner != _local_company || (v->vehstatus & VS_CRASHED) != 0) return;
 
	/* Don't warn about vehicles which are non-primary (e.g., part of an articulated vehicle), don't belong to us, are crashed, or are stopped */
 
	if (v->Previous() != nullptr || v->owner != _local_company || (v->vehstatus & VS_CRASHED) != 0 || (v->vehstatus & VS_STOPPED) != 0) return;
 

	
 
	const Company *c = Company::Get(v->owner);
 
	/* Don't warn if a renew is active */
0 comments (0 inline, 0 general)