diff options
author | belugas <belugas@openttd.org> | 2007-01-30 11:53:35 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2007-01-30 11:53:35 +0000 |
commit | e8af755d7fc3b405f64b39cc4216b7fd4a7e9d23 (patch) | |
tree | d001f734f6111d6fe12abd4a122d09903325335c /src/engine.cpp | |
parent | 5a9873c3bdb1fd8081f684036e7b82dbbe330fba (diff) | |
download | openttd-e8af755d7fc3b405f64b39cc4216b7fd4a7e9d23.tar.xz |
(svn r8455) -Codechange: Give a more meaningful name (railveh_type)to member flags of RailVehInfo, as well as changing the code to reflect the fact that it was not a flag but rather a one value only variable. Doing so, some evaluations have been simplified.
-Codechange: Add and use RAILVEH_SINGLEHEAD when railveh_type is set to 0, which was implicit before.
-Cleanup: Remove some extraneous parenthesis.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index ec4c27ec2..c23909f50 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -285,7 +285,7 @@ int32 CmdWantEnginePreview(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) // Determine if an engine type is a wagon (and not a loco) static bool IsWagon(EngineID index) { - return index < NUM_TRAIN_ENGINES && RailVehInfo(index)->flags & RVI_WAGON; + return index < NUM_TRAIN_ENGINES && RailVehInfo(index)->railveh_type == RAILVEH_WAGON; } static void NewVehicleAvailable(Engine *e) |