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
commit1e79d68a340565b2a84b21dbd2e229a34fcb9f94 (patch)
tree527bd7a977a5af698c6f07abe2cbf1cb4301fb02
parent06a336d53d5793e9cb09cfb9a578673467a7ab88 (diff)
downloadopenttd-1e79d68a340565b2a84b21dbd2e229a34fcb9f94.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;
}