(svn r18939) -Codechange [FS#3545]: Move train slope steepness to its own function.

This commit is contained in:
terkhen
2010-01-28 20:54:29 +00:00
parent b1603d0d2c
commit c9a3d4ea29
2 changed files with 10 additions and 1 deletions

View File

@@ -139,7 +139,7 @@ void Train::CargoChanged()
for (Train *u = this; u != NULL; u = u->Next()) {
uint32 current_weight = u->GetWeight();
weight += current_weight;
u->tcache.cached_slope_resistance = current_weight * 20 * _settings_game.vehicle.train_slope_steepness; //1% slope * slope steepness
u->tcache.cached_slope_resistance = current_weight * u->GetSlopeSteepness();
}
/* store consist weight in cache */