summaryrefslogtreecommitdiff
path: root/src/train.h
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-03-06 12:50:55 +0000
committerterkhen <terkhen@openttd.org>2010-03-06 12:50:55 +0000
commit4e6cac84d6d30ea07fe7035f76085f8b0b55df78 (patch)
treeb16c3b54612de1357bcd3859fbab8dc183990617 /src/train.h
parent1c3b7c35a7efbd05da32c97d0a6b4fc49fed087a (diff)
downloadopenttd-4e6cac84d6d30ea07fe7035f76085f8b0b55df78.tar.xz
(svn r19341) -Codechange: Move GOINGUP/GOINGDOWN flags to GroundVehicle.
-Codechange: Move GetSlopeResistance to GroundVehicle.
Diffstat (limited to 'src/train.h')
-rw-r--r--src/train.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/train.h b/src/train.h
index 30226e605..71724c2c3 100644
--- a/src/train.h
+++ b/src/train.h
@@ -24,10 +24,6 @@ struct Train;
enum VehicleRailFlags {
VRF_REVERSING = 0,
- /* used to calculate if train is going up or down */
- VRF_GOINGUP = 1,
- VRF_GOINGDOWN = 2,
-
/* used to store if a wagon is powered or not */
VRF_POWEREDWAGON = 3,
@@ -453,25 +449,6 @@ protected: // These functions should not be called outside acceleration code.
}
/**
- * Calculates the total slope resistance for this vehicle.
- * @return Slope resistance.
- */
- FORCEINLINE int32 GetSlopeResistance() const
- {
- int32 incl = 0;
-
- for (const Train *u = this; u != NULL; u = u->Next()) {
- if (HasBit(u->flags, VRF_GOINGUP)) {
- incl += u->acc_cache.cached_slope_resistance;
- } else if (HasBit(u->flags, VRF_GOINGDOWN)) {
- incl -= u->acc_cache.cached_slope_resistance;
- }
- }
-
- return incl;
- }
-
- /**
* Allows to know the acceleration type of a vehicle.
* @return Acceleration type of the vehicle.
*/