summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-10-13 15:15:22 +0000
committerpeter1138 <peter1138@openttd.org>2006-10-13 15:15:22 +0000
commit35b059210dc8c2f73ff386483bf11b6c6ab2e496 (patch)
tree527bd7a977a5af698c6f07abe2cbf1cb4301fb02
parent22774d093cffcc5822193b285494cdccfcf06f16 (diff)
downloadopenttd-35b059210dc8c2f73ff386483bf11b6c6ab2e496.tar.xz
(svn r6765) - Fix: Don't add up running cost of articulated engine parts.
-rw-r--r--train_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/train_cmd.c b/train_cmd.c
index bd9b9bd86..3a1594c22 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -3560,7 +3560,7 @@ int32 GetTrainRunningCost(const Vehicle *v)
const RailVehicleInfo *rvi = RailVehInfo(v->engine_type);
if (rvi->running_cost_base > 0)
cost += rvi->running_cost_base * _price.running_rail[rvi->running_cost_class];
- } while ((v = v->next) != NULL);
+ } while ((v = GetNextVehicle(v)) != NULL);
return cost;
}