diff options
author | frosch <frosch@openttd.org> | 2009-11-08 12:18:59 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-11-08 12:18:59 +0000 |
commit | e781929d7f7d472bd400cc0d00407c97f469f841 (patch) | |
tree | 24fa3d027bf2a58f8b8126c60fb945aeea41e681 /src | |
parent | a6b362ff831533ff67a83ba1dbca6d4b8f1ad97b (diff) | |
download | openttd-e781929d7f7d472bd400cc0d00407c97f469f841.tar.xz |
(svn r18007) -Codechange: No need to call CB 36 'running cost factor' if the vehicle has no running cost class anyway.
Diffstat (limited to 'src')
-rw-r--r-- | src/train_cmd.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 1dd977353..0be119ef9 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -4436,6 +4436,7 @@ Money Train::GetRunningCost() const do { const RailVehicleInfo *rvi = RailVehInfo(v->engine_type); + if (rvi->running_cost_class == INVALID_PRICE) continue; byte cost_factor = GetVehicleProperty(v, PROP_TRAIN_RUNNING_COST_FACTOR, rvi->running_cost); if (cost_factor == 0) continue; |