Changeset - r9678:b6aeab97f84b
[Not reviewed]
master
0 1 0
glx - 16 years ago 2008-07-22 15:02:18
glx@openttd.org
(svn r13782) -Cleanup: removed a useless declaration
1 file changed with 0 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/train.h
Show inline comments
 
@@ -241,49 +241,48 @@ static inline bool IsRearDualheaded(cons
 
static inline Vehicle *GetNextVehicle(const Vehicle *v)
 
{
 
	assert(v->type == VEH_TRAIN);
 
	while (EngineHasArticPart(v)) v = GetNextArticPart(v);
 

	
 
	/* v now contains the last artic part in the engine */
 
	return v->Next();
 
}
 

	
 
/** Get the next real (non-articulated part and non rear part of dualheaded engine) vehicle in the consist.
 
 * @param v Vehicle.
 
 * @return Next vehicle in the consist.
 
 */
 
static inline Vehicle *GetNextUnit(Vehicle *v)
 
{
 
	assert(v->type == VEH_TRAIN);
 
	v = GetNextVehicle(v);
 
	if (v != NULL && IsRearDualheaded(v)) v = v->Next();
 

	
 
	return v;
 
}
 

	
 
void ConvertOldMultiheadToNew();
 
void ConnectMultiheadedTrains();
 
uint CountArticulatedParts(EngineID engine_type);
 

	
 
void CcBuildLoco(bool success, TileIndex tile, uint32 p1, uint32 p2);
 
void CcBuildWagon(bool success, TileIndex tile, uint32 p1, uint32 p2);
 

	
 
byte FreightWagonMult(CargoID cargo);
 

	
 
int CheckTrainInDepot(const Vehicle *v, bool needs_to_be_stopped);
 
int CheckTrainStoppedInDepot(const Vehicle *v);
 
void UpdateTrainAcceleration(Vehicle* v);
 

	
 
/**
 
 * This class 'wraps' Vehicle; you do not actually instantiate this class.
 
 * You create a Vehicle using AllocateVehicle, so it is added to the pool
 
 * and you reinitialize that to a Train using:
 
 *   v = new (v) Train();
 
 *
 
 * As side-effect the vehicle type is set correctly.
 
 */
 
struct Train : public Vehicle {
 
	/** Initializes the Vehicle to a train */
 
	Train() { this->type = VEH_TRAIN; }
 

	
 
	/** We want to 'destruct' the right class. */
 
	virtual ~Train() { this->PreDestructor(); }
0 comments (0 inline, 0 general)