summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ground_vehicle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ground_vehicle.cpp b/src/ground_vehicle.cpp
index 419d9483b..395f0c26b 100644
--- a/src/ground_vehicle.cpp
+++ b/src/ground_vehicle.cpp
@@ -80,7 +80,7 @@ void GroundVehicle<T, Type>::CargoChanged()
}
/* Store consist weight in cache. */
- this->acc_cache.cached_weight = weight;
+ this->acc_cache.cached_weight = max<uint32>(1, weight);
/* Now update vehicle power (tractive effort is dependent on weight). */
this->PowerChanged();