changeset 13488:aba01968c037 draft

(svn r18007) -Codechange: No need to call CB 36 'running cost factor' if the vehicle has no running cost class anyway.
author frosch <frosch@openttd.org>
date Sun, 08 Nov 2009 12:18:59 +0000
parents 4ff75a36a676
children afa5c1a70640
files src/train_cmd.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -4436,6 +4436,7 @@
 
 	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;