2005-11-19 00:41:03 +01:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 22:21:05 +02:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
|
|
|
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2008-05-06 17:11:33 +02:00
|
|
|
/** @file train.h Base for the train class. */
|
2007-04-04 05:21:14 +02:00
|
|
|
|
2005-11-19 00:41:03 +01:00
|
|
|
#ifndef TRAIN_H
|
|
|
|
#define TRAIN_H
|
|
|
|
|
2014-02-08 00:48:56 +01:00
|
|
|
#include "core/enum_type.hpp"
|
|
|
|
|
2010-01-16 23:30:04 +01:00
|
|
|
#include "newgrf_engine.h"
|
|
|
|
#include "cargotype.h"
|
|
|
|
#include "rail.h"
|
|
|
|
#include "engine_base.h"
|
|
|
|
#include "rail_map.h"
|
2010-03-06 13:41:18 +01:00
|
|
|
#include "ground_vehicle.hpp"
|
2005-11-19 00:41:03 +01:00
|
|
|
|
2009-05-23 00:22:46 +02:00
|
|
|
struct Train;
|
2005-11-19 00:41:03 +01:00
|
|
|
|
2011-01-29 22:37:11 +01:00
|
|
|
/** Rail vehicle flags. */
|
2009-05-23 00:33:05 +02:00
|
|
|
enum VehicleRailFlags {
|
2011-01-29 22:37:11 +01:00
|
|
|
VRF_REVERSING = 0,
|
|
|
|
VRF_POWEREDWAGON = 3, ///< Wagon is powered.
|
|
|
|
VRF_REVERSE_DIRECTION = 4, ///< Reverse the visible direction of the vehicle.
|
|
|
|
|
|
|
|
VRF_EL_ENGINE_ALLOWED_NORMAL_RAIL = 6, ///< Electric train engine is allowed to run on normal rail. */
|
|
|
|
VRF_TOGGLE_REVERSE = 7, ///< Used for vehicle var 0xFE bit 8 (toggled each time the train is reversed, accurate for first vehicle only).
|
|
|
|
VRF_TRAIN_STUCK = 8, ///< Train can't get a path reservation.
|
|
|
|
VRF_LEAVING_STATION = 9, ///< Train is just leaving a station.
|
2009-05-23 00:33:05 +02:00
|
|
|
};
|
|
|
|
|
2010-06-21 19:35:27 +02:00
|
|
|
/** Modes for ignoring signals. */
|
2019-04-21 23:30:13 +02:00
|
|
|
enum TrainForceProceeding : byte {
|
2010-06-21 19:35:27 +02:00
|
|
|
TFP_NONE = 0, ///< Normal operation.
|
|
|
|
TFP_STUCK = 1, ///< Proceed till next signal, but ignore being stuck till then. This includes force leaving depots.
|
2013-01-08 23:46:42 +01:00
|
|
|
TFP_SIGNAL = 2, ///< Ignore next signal, after the signal ignore being stuck.
|
2010-06-21 19:35:27 +02:00
|
|
|
};
|
|
|
|
|
2014-02-08 00:48:56 +01:00
|
|
|
/** Flags for Train::ConsistChanged */
|
|
|
|
enum ConsistChangeFlags {
|
|
|
|
CCF_LENGTH = 0x01, ///< Allow vehicles to change length.
|
|
|
|
CCF_CAPACITY = 0x02, ///< Allow vehicles to change capacity.
|
|
|
|
|
|
|
|
CCF_TRACK = 0, ///< Valid changes while vehicle is driving, and possibly changing tracks.
|
|
|
|
CCF_LOADUNLOAD = 0, ///< Valid changes while vehicle is loading/unloading.
|
|
|
|
CCF_AUTOREFIT = CCF_CAPACITY, ///< Valid changes for autorefitting in stations.
|
|
|
|
CCF_REFIT = CCF_LENGTH | CCF_CAPACITY, ///< Valid changes for refitting in a depot.
|
|
|
|
CCF_ARRANGE = CCF_LENGTH | CCF_CAPACITY, ///< Valid changes for arranging the consist in a depot.
|
|
|
|
CCF_SAVELOAD = CCF_LENGTH, ///< Valid changes when loading a savegame. (Everything that is not stored in the save.)
|
|
|
|
};
|
|
|
|
DECLARE_ENUM_AS_BIT_SET(ConsistChangeFlags)
|
|
|
|
|
2009-05-23 00:22:46 +02:00
|
|
|
byte FreightWagonMult(CargoID cargo);
|
|
|
|
|
|
|
|
void CheckTrainsLengths();
|
|
|
|
|
2017-03-20 18:49:44 +01:00
|
|
|
void FreeTrainTrackReservation(const Train *v);
|
2009-05-23 00:22:46 +02:00
|
|
|
bool TryPathReserve(Train *v, bool mark_as_stuck = false, bool first_tile_okay = false);
|
|
|
|
|
|
|
|
int GetTrainStopLocation(StationID station_id, TileIndex tile, const Train *v, int *station_ahead, int *station_length);
|
|
|
|
|
2012-12-23 02:00:25 +01:00
|
|
|
void GetTrainSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, int &yoffs, EngineImageType image_type);
|
|
|
|
|
2009-05-23 00:55:41 +02:00
|
|
|
/** Variables that are cached to improve performance and such */
|
2010-03-06 13:42:53 +01:00
|
|
|
struct TrainCache {
|
2009-05-23 00:55:41 +02:00
|
|
|
/* Cached wagon override spritegroup */
|
|
|
|
const struct SpriteGroup *cached_override;
|
|
|
|
|
|
|
|
/* cached values, recalculated on load and each time a vehicle is added to/removed from the consist. */
|
2010-01-30 11:41:15 +01:00
|
|
|
bool cached_tilt; ///< train can tilt; feature provides a bonus in curves
|
2009-05-23 00:55:41 +02:00
|
|
|
|
2010-12-14 22:33:53 +01:00
|
|
|
byte user_def_data; ///< Cached property 0x25. Can be set by Callback 0x36.
|
|
|
|
|
2009-06-01 15:14:56 +02:00
|
|
|
/* cached max. speed / acceleration data */
|
|
|
|
int cached_max_curve_speed; ///< max consist speed limited by curves
|
2009-05-23 00:55:41 +02:00
|
|
|
};
|
|
|
|
|
2009-05-23 00:22:46 +02:00
|
|
|
/**
|
2009-05-27 01:24:34 +02:00
|
|
|
* 'Train' is either a loco or a wagon.
|
2009-05-23 00:22:46 +02:00
|
|
|
*/
|
2011-12-18 18:17:18 +01:00
|
|
|
struct Train FINAL : public GroundVehicle<Train, VEH_TRAIN> {
|
2009-05-23 00:55:41 +02:00
|
|
|
TrainCache tcache;
|
|
|
|
|
2009-05-23 00:33:05 +02:00
|
|
|
/* Link between the two ends of a multiheaded engine */
|
|
|
|
Train *other_multiheaded_part;
|
|
|
|
|
2011-02-05 17:20:55 +01:00
|
|
|
uint16 crash_anim_pos; ///< Crash animation counter.
|
2009-05-23 00:33:05 +02:00
|
|
|
|
|
|
|
uint16 flags;
|
|
|
|
TrackBitsByte track;
|
2019-04-21 23:30:13 +02:00
|
|
|
TrainForceProceeding force_proceed;
|
2009-05-23 00:33:05 +02:00
|
|
|
RailTypeByte railtype;
|
|
|
|
RailTypes compatible_railtypes;
|
|
|
|
|
2010-01-09 15:43:08 +01:00
|
|
|
/** Ticks waiting in front of a signal, ticks being stuck or a counter for forced proceeding through signals. */
|
|
|
|
uint16 wait_counter;
|
|
|
|
|
2009-06-02 21:12:28 +02:00
|
|
|
/** We don't want GCC to zero our struct! It already is zeroed and has an index! */
|
2011-01-21 15:43:38 +01:00
|
|
|
Train() : GroundVehicleBase() {}
|
2009-05-23 00:22:46 +02:00
|
|
|
/** We want to 'destruct' the right class. */
|
|
|
|
virtual ~Train() { this->PreDestructor(); }
|
|
|
|
|
2010-03-06 13:44:30 +01:00
|
|
|
friend struct GroundVehicle<Train, VEH_TRAIN>; // GroundVehicle needs to use the acceleration functions defined at Train.
|
|
|
|
|
2009-05-23 00:22:46 +02:00
|
|
|
void MarkDirty();
|
2018-05-22 19:43:34 +02:00
|
|
|
void UpdateDeltaXY();
|
2009-05-23 00:22:46 +02:00
|
|
|
ExpensesType GetExpenseType(bool income) const { return income ? EXPENSES_TRAIN_INC : EXPENSES_TRAIN_RUN; }
|
|
|
|
void PlayLeaveStationSound() const;
|
2009-07-02 00:22:01 +02:00
|
|
|
bool IsPrimaryVehicle() const { return this->IsFrontEngine(); }
|
2016-10-16 16:57:56 +02:00
|
|
|
void GetImage(Direction direction, EngineImageType image_type, VehicleSpriteSeq *result) const;
|
2011-01-26 18:31:07 +01:00
|
|
|
int GetDisplaySpeed() const { return this->gcache.last_speed; }
|
2010-11-06 13:53:31 +01:00
|
|
|
int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed; }
|
2009-05-23 00:22:46 +02:00
|
|
|
Money GetRunningCost() const;
|
2019-04-10 23:07:06 +02:00
|
|
|
int GetDisplayImageWidth(Point *offset = nullptr) const;
|
2012-07-07 17:39:46 +02:00
|
|
|
bool IsInDepot() const { return this->track == TRACK_BIT_DEPOT; }
|
2009-05-23 00:22:46 +02:00
|
|
|
bool Tick();
|
|
|
|
void OnNewDay();
|
2009-12-04 21:29:46 +01:00
|
|
|
uint Crash(bool flooded = false);
|
2009-05-23 00:22:46 +02:00
|
|
|
Trackdir GetVehicleTrackdir() const;
|
|
|
|
TileIndex GetOrderStationLocation(StationID station);
|
|
|
|
bool FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse);
|
2009-07-02 00:22:01 +02:00
|
|
|
|
2009-07-17 15:54:06 +02:00
|
|
|
void ReserveTrackUnderConsist() const;
|
2010-01-15 19:23:52 +01:00
|
|
|
|
|
|
|
int GetCurveSpeedLimit() const;
|
|
|
|
|
2014-02-08 00:48:56 +01:00
|
|
|
void ConsistChanged(ConsistChangeFlags allowed_changes);
|
2010-01-15 19:23:52 +01:00
|
|
|
|
2010-01-16 23:16:28 +01:00
|
|
|
int UpdateSpeed();
|
|
|
|
|
2010-01-15 19:23:52 +01:00
|
|
|
void UpdateAcceleration();
|
2009-07-02 14:10:39 +02:00
|
|
|
|
2010-01-16 23:30:04 +01:00
|
|
|
int GetCurrentMaxSpeed() const;
|
|
|
|
|
2009-07-02 14:10:39 +02:00
|
|
|
/**
|
|
|
|
* Get the next real (non-articulated part and non rear part of dualheaded engine) vehicle in the consist.
|
|
|
|
* @return Next vehicle in the consist.
|
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline Train *GetNextUnit() const
|
2009-07-02 14:10:39 +02:00
|
|
|
{
|
|
|
|
Train *v = this->GetNextVehicle();
|
2019-04-10 23:07:06 +02:00
|
|
|
if (v != nullptr && v->IsRearDualheaded()) v = v->GetNextVehicle();
|
2007-09-05 12:33:42 +02:00
|
|
|
|
2009-07-02 14:10:39 +02:00
|
|
|
return v;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the previous real (non-articulated part and non rear part of dualheaded engine) vehicle in the consist.
|
|
|
|
* @return Previous vehicle in the consist.
|
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline Train *GetPrevUnit()
|
2009-07-02 14:10:39 +02:00
|
|
|
{
|
|
|
|
Train *v = this->GetPrevVehicle();
|
2019-04-10 23:07:06 +02:00
|
|
|
if (v != nullptr && v->IsRearDualheaded()) v = v->GetPrevVehicle();
|
2009-07-02 14:10:39 +02:00
|
|
|
|
|
|
|
return v;
|
|
|
|
}
|
2010-01-16 23:30:04 +01:00
|
|
|
|
2011-11-21 21:51:43 +01:00
|
|
|
/**
|
|
|
|
* Calculate the offset from this vehicle's center to the following center taking the vehicle lengths into account.
|
|
|
|
* @return Offset from center to center.
|
|
|
|
*/
|
|
|
|
int CalcNextVehicleOffset() const
|
|
|
|
{
|
|
|
|
/* For vehicles with odd lengths the part before the center will be one unit
|
|
|
|
* longer than the part after the center. This means we have to round up the
|
|
|
|
* length of the next vehicle but may not round the length of the current
|
|
|
|
* vehicle. */
|
2019-04-10 23:07:06 +02:00
|
|
|
return this->gcache.cached_veh_length / 2 + (this->Next() != nullptr ? this->Next()->gcache.cached_veh_length + 1 : 0) / 2;
|
2011-11-21 21:51:43 +01:00
|
|
|
}
|
2010-01-16 23:30:04 +01:00
|
|
|
|
2010-02-10 22:06:05 +01:00
|
|
|
protected: // These functions should not be called outside acceleration code.
|
2010-01-16 23:30:04 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Allows to know the power value that this vehicle will use.
|
|
|
|
* @return Power value from the engine in HP, or zero if the vehicle is not powered.
|
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline uint16 GetPower() const
|
2010-01-16 23:30:04 +01:00
|
|
|
{
|
|
|
|
/* Power is not added for articulated parts */
|
|
|
|
if (!this->IsArticulatedPart() && HasPowerOnRail(this->railtype, GetRailType(this->tile))) {
|
|
|
|
uint16 power = GetVehicleProperty(this, PROP_TRAIN_POWER, RailVehInfo(this->engine_type)->power);
|
|
|
|
/* Halve power for multiheaded parts */
|
|
|
|
if (this->IsMultiheaded()) power /= 2;
|
|
|
|
return power;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a value if this articulated part is powered.
|
|
|
|
* @return Power value from the articulated part in HP, or zero if it is not powered.
|
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline uint16 GetPoweredPartPower(const Train *head) const
|
2010-01-16 23:30:04 +01:00
|
|
|
{
|
2010-08-15 20:35:57 +02:00
|
|
|
/* For powered wagons the engine defines the type of engine (i.e. railtype) */
|
|
|
|
if (HasBit(this->flags, VRF_POWEREDWAGON) && HasPowerOnRail(head->railtype, GetRailType(this->tile))) {
|
2010-12-14 22:33:53 +01:00
|
|
|
return RailVehInfo(this->gcache.first_engine)->pow_wag_power;
|
2010-01-16 23:30:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Allows to know the weight value that this vehicle will use.
|
|
|
|
* @return Weight value from the engine in tonnes.
|
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline uint16 GetWeight() const
|
2010-01-16 23:30:04 +01:00
|
|
|
{
|
2013-04-13 15:42:08 +02:00
|
|
|
uint16 weight = (CargoSpec::Get(this->cargo_type)->weight * this->cargo.StoredCount() * FreightWagonMult(this->cargo_type)) / 16;
|
2010-01-16 23:30:04 +01:00
|
|
|
|
|
|
|
/* Vehicle weight is not added for articulated parts. */
|
|
|
|
if (!this->IsArticulatedPart()) {
|
|
|
|
weight += GetVehicleProperty(this, PROP_TRAIN_WEIGHT, RailVehInfo(this->engine_type)->weight);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Powered wagons have extra weight added. */
|
|
|
|
if (HasBit(this->flags, VRF_POWEREDWAGON)) {
|
2010-12-14 22:33:53 +01:00
|
|
|
weight += RailVehInfo(this->gcache.first_engine)->pow_wag_weight;
|
2010-01-16 23:30:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return weight;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Allows to know the tractive effort value that this vehicle will use.
|
|
|
|
* @return Tractive effort value from the engine.
|
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline byte GetTractiveEffort() const
|
2010-01-16 23:30:04 +01:00
|
|
|
{
|
|
|
|
return GetVehicleProperty(this, PROP_TRAIN_TRACTIVE_EFFORT, RailVehInfo(this->engine_type)->tractive_effort);
|
|
|
|
}
|
|
|
|
|
2010-08-02 16:49:23 +02:00
|
|
|
/**
|
|
|
|
* Gets the area used for calculating air drag.
|
2010-11-07 14:35:07 +01:00
|
|
|
* @return Area of the engine in m^2.
|
2010-08-02 16:49:23 +02:00
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline byte GetAirDragArea() const
|
2010-08-02 16:49:23 +02:00
|
|
|
{
|
2010-11-07 14:35:07 +01:00
|
|
|
/* Air drag is higher in tunnels due to the limited cross-section. */
|
|
|
|
return (this->track == TRACK_BIT_WORMHOLE && this->vehstatus & VS_HIDDEN) ? 28 : 14;
|
2010-08-02 16:49:23 +02:00
|
|
|
}
|
|
|
|
|
2010-08-02 16:52:51 +02:00
|
|
|
/**
|
|
|
|
* Gets the air drag coefficient of this vehicle.
|
|
|
|
* @return Air drag value from the engine.
|
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline byte GetAirDrag() const
|
2010-08-02 16:52:51 +02:00
|
|
|
{
|
|
|
|
return RailVehInfo(this->engine_type)->air_drag;
|
|
|
|
}
|
|
|
|
|
2010-01-16 23:30:04 +01:00
|
|
|
/**
|
|
|
|
* Checks the current acceleration status of this vehicle.
|
|
|
|
* @return Acceleration status.
|
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline AccelStatus GetAccelerationStatus() const
|
2010-01-16 23:30:04 +01:00
|
|
|
{
|
2010-01-18 00:03:43 +01:00
|
|
|
return (this->vehstatus & VS_STOPPED) || HasBit(this->flags, VRF_REVERSING) || HasBit(this->flags, VRF_TRAIN_STUCK) ? AS_BRAKE : AS_ACCEL;
|
2010-01-16 23:30:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Calculates the current speed of this vehicle.
|
2010-11-07 14:35:07 +01:00
|
|
|
* @return Current speed in km/h-ish.
|
2010-01-16 23:30:04 +01:00
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline uint16 GetCurrentSpeed() const
|
2010-01-16 23:30:04 +01:00
|
|
|
{
|
2010-11-07 14:35:07 +01:00
|
|
|
return this->cur_speed;
|
2010-01-16 23:30:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the rolling friction coefficient of this vehicle.
|
2010-11-07 14:35:07 +01:00
|
|
|
* @return Rolling friction coefficient in [1e-4].
|
2010-01-16 23:30:04 +01:00
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline uint32 GetRollingFriction() const
|
2010-01-16 23:30:04 +01:00
|
|
|
{
|
2011-01-04 19:12:28 +01:00
|
|
|
/* Rolling friction for steel on steel is between 0.1% and 0.2%.
|
2010-11-07 14:35:07 +01:00
|
|
|
* The friction coefficient increases with speed in a way that
|
|
|
|
* it doubles at 512 km/h, triples at 1024 km/h and so on. */
|
2011-01-04 19:12:28 +01:00
|
|
|
return 15 * (512 + this->GetCurrentSpeed()) / 512;
|
2010-01-16 23:30:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Allows to know the acceleration type of a vehicle.
|
|
|
|
* @return Acceleration type of the vehicle.
|
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline int GetAccelerationType() const
|
2010-01-16 23:30:04 +01:00
|
|
|
{
|
|
|
|
return GetRailTypeInfo(this->railtype)->acceleration_type;
|
|
|
|
}
|
2010-01-28 21:54:29 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the slope steepness used by this vehicle.
|
|
|
|
* @return Slope steepness used by the vehicle.
|
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline uint32 GetSlopeSteepness() const
|
2010-01-28 21:54:29 +01:00
|
|
|
{
|
2010-11-07 14:35:07 +01:00
|
|
|
return _settings_game.vehicle.train_slope_steepness;
|
2010-01-28 21:54:29 +01:00
|
|
|
}
|
2010-03-06 13:27:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the maximum speed allowed by the track for this vehicle.
|
|
|
|
* @return Maximum speed allowed.
|
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline uint16 GetMaxTrackSpeed() const
|
2010-03-06 13:27:23 +01:00
|
|
|
{
|
|
|
|
return GetRailTypeInfo(GetRailType(this->tile))->max_speed;
|
|
|
|
}
|
2010-03-06 13:52:44 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks if the vehicle is at a tile that can be sloped.
|
|
|
|
* @return True if the tile can be sloped.
|
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline bool TileMayHaveSlopedTrack() const
|
2010-03-06 13:52:44 +01:00
|
|
|
{
|
|
|
|
/* Any track that isn't TRACK_BIT_X or TRACK_BIT_Y cannot be sloped. */
|
|
|
|
return this->track == TRACK_BIT_X || this->track == TRACK_BIT_Y;
|
|
|
|
}
|
2011-01-21 18:35:17 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Trains can always use the faster algorithm because they
|
|
|
|
* have always the same direction as the track under them.
|
|
|
|
* @return false
|
|
|
|
*/
|
2011-12-20 18:57:56 +01:00
|
|
|
inline bool HasToUseGetSlopePixelZ()
|
2011-01-21 18:35:17 +01:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2009-07-02 14:10:39 +02:00
|
|
|
};
|
2008-08-16 16:02:20 +02:00
|
|
|
|
2009-07-02 14:10:39 +02:00
|
|
|
#define FOR_ALL_TRAINS(var) FOR_ALL_VEHICLES_OF_TYPE(Train, var)
|
2008-08-16 16:02:20 +02:00
|
|
|
|
2005-11-19 00:41:03 +01:00
|
|
|
#endif /* TRAIN_H */
|