(svn r10009) -Codechange: Add and use Vehicle::IsPrimaryVehicle to replace individual checks depending on the vehicle type.

This commit is contained in:
maedhros
2007-06-01 12:03:10 +00:00
parent ab8503f5a5
commit 4acf3e4c3f
10 changed files with 31 additions and 33 deletions

View File

@@ -399,6 +399,17 @@ struct Vehicle {
* Play the sound associated with leaving the station
*/
virtual void PlayLeaveStationSound() const {}
/**
* Whether this is the primary vehicle in the chain.
*/
virtual bool IsPrimaryVehicle() const { return false; }
/**
* Whether this vehicle understands the concept of a front engine, so
* basically, if GetFirstVehicleInChain() can be called for it.
*/
virtual bool HasFront() const { return false; }
};
/**