(svn r21921) -Codechange: Move GroundVehicleSubtypeFlags as they will be needed by some Vehicle functions.
This commit is contained in:
		@@ -242,19 +242,6 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> {
 | 
				
			|||||||
		return old_z;
 | 
							return old_z;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
					 | 
				
			||||||
	 * Enum to handle ground vehicle subtypes.
 | 
					 | 
				
			||||||
	 * Do not access it directly unless you have to. Use the subtype access functions.
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	enum GroundVehicleSubtypeFlags {
 | 
					 | 
				
			||||||
		GVSF_FRONT            = 0, ///< Leading engine of a consist.
 | 
					 | 
				
			||||||
		GVSF_ARTICULATED_PART = 1, ///< Articulated part of an engine.
 | 
					 | 
				
			||||||
		GVSF_WAGON            = 2, ///< Wagon (not used for road vehicles).
 | 
					 | 
				
			||||||
		GVSF_ENGINE           = 3, ///< Engine that can be front engine, but might be placed behind another engine (not used for road vehicles).
 | 
					 | 
				
			||||||
		GVSF_FREE_WAGON       = 4, ///< First in a wagon chain (in depot) (not used for road vehicles).
 | 
					 | 
				
			||||||
		GVSF_MULTIHEADED      = 5, ///< Engine is multiheaded (not used for road vehicles).
 | 
					 | 
				
			||||||
	};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
	 * Set front engine state.
 | 
						 * Set front engine state.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -84,6 +84,20 @@ enum VisualEffect {
 | 
				
			|||||||
	VE_DEFAULT = 0xFF,          ///< Default value to indicate that visual effect should be based on engine class
 | 
						VE_DEFAULT = 0xFF,          ///< Default value to indicate that visual effect should be based on engine class
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Enum to handle ground vehicle subtypes.
 | 
				
			||||||
 | 
					 * This is defined here instead of at #GroundVehicle because some common function require access to these flags.
 | 
				
			||||||
 | 
					 * Do not access it directly unless you have to. Use the subtype access functions.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					enum GroundVehicleSubtypeFlags {
 | 
				
			||||||
 | 
						GVSF_FRONT            = 0, ///< Leading engine of a consist.
 | 
				
			||||||
 | 
						GVSF_ARTICULATED_PART = 1, ///< Articulated part of an engine.
 | 
				
			||||||
 | 
						GVSF_WAGON            = 2, ///< Wagon (not used for road vehicles).
 | 
				
			||||||
 | 
						GVSF_ENGINE           = 3, ///< Engine that can be front engine, but might be placed behind another engine (not used for road vehicles).
 | 
				
			||||||
 | 
						GVSF_FREE_WAGON       = 4, ///< First in a wagon chain (in depot) (not used for road vehicles).
 | 
				
			||||||
 | 
						GVSF_MULTIHEADED      = 5, ///< Engine is multiheaded (not used for road vehicles).
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Cached often queried values common to all vehicles. */
 | 
					/** Cached often queried values common to all vehicles. */
 | 
				
			||||||
struct VehicleCache {
 | 
					struct VehicleCache {
 | 
				
			||||||
	uint16 cached_max_speed; ///< Maximum speed of the consist (minimum of the max speed of all vehicles in the consist).
 | 
						uint16 cached_max_speed; ///< Maximum speed of the consist (minimum of the max speed of all vehicles in the consist).
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user