summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 3b0347a7a..045b7d478 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -44,9 +44,7 @@ static void TrainCargoChanged(Vehicle* v)
for (u = v; u != NULL; u = u->next) {
const RailVehicleInfo *rvi = RailVehInfo(u->engine_type);
- uint16 vweight = 0;
-
- vweight += (_cargoc.weights[u->cargo_type] * u->cargo_count) / 16;
+ uint16 vweight = (_cargoc.weights[u->cargo_type] * u->cargo_count) / 16;
// Vehicle weight is not added for articulated parts.
if (!IsArticulatedPart(u)) {