summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-07-16 19:00:13 +0000
committersmatz <smatz@openttd.org>2009-07-16 19:00:13 +0000
commit1f29e38b8372484d51d852b89fc957eb53635ecb (patch)
treeda4a251ac74e87e72a2857233069790f991914f6 /src/train_cmd.cpp
parentb6889daf8d11b083358a26eea3f633942e2e50e4 (diff)
downloadopenttd-1f29e38b8372484d51d852b89fc957eb53635ecb.tar.xz
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 835c69639..3a4dde6a9 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -76,7 +76,7 @@ static inline DiagDirection TrainExitDir(Direction direction, TrackBits track)
*/
byte FreightWagonMult(CargoID cargo)
{
- if (!GetCargo(cargo)->is_freight) return 1;
+ if (!CargoSpec::Get(cargo)->is_freight) return 1;
return _settings_game.vehicle.freight_trains;
}
@@ -139,7 +139,7 @@ static void TrainCargoChanged(Train *v)
uint32 weight = 0;
for (Train *u = v; u != NULL; u = u->Next()) {
- uint32 vweight = GetCargo(u->cargo_type)->weight * u->cargo.Count() * FreightWagonMult(u->cargo_type) / 16;
+ uint32 vweight = CargoSpec::Get(u->cargo_type)->weight * u->cargo.Count() * FreightWagonMult(u->cargo_type) / 16;
/* Vehicle weight is not added for articulated parts. */
if (!u->IsArticulatedPart()) {