summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTyler Trahan <tyler@tylertrahan.com>2021-11-26 16:35:54 -0700
committerrubidium42 <rubidium42@users.noreply.github.com>2021-12-20 22:13:37 +0100
commit9c18236f2c691cf4f21693f2693256a31faafae8 (patch)
tree8bc3b1589e9209b2cf9968c661466970e9a83db6 /src
parente67124e1745737853aa26597aacdb36213da23d5 (diff)
downloadopenttd-9c18236f2c691cf4f21693f2693256a31faafae8.tar.xz
Fix: Suppress vehicle age warnings for stopped vehicles
Diffstat (limited to 'src')
-rw-r--r--src/vehicle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 11b409594..120c4a259 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -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 */