summaryrefslogtreecommitdiff
path: root/src/train.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/train.h')
-rw-r--r--src/train.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train.h b/src/train.h
index 2e118889f..8f4bc2a9b 100644
--- a/src/train.h
+++ b/src/train.h
@@ -199,7 +199,7 @@ protected: // These functions should not be called outside acceleration code.
*/
inline uint16 GetWeight() const
{
- uint16 weight = (CargoSpec::Get(this->cargo_type)->weight * this->cargo.Count() * FreightWagonMult(this->cargo_type)) / 16;
+ uint16 weight = (CargoSpec::Get(this->cargo_type)->weight * this->cargo.StoredCount() * FreightWagonMult(this->cargo_type)) / 16;
/* Vehicle weight is not added for articulated parts. */
if (!this->IsArticulatedPart()) {