src/vehicle.h
changeset 6040 40cc9da90508
parent 6035 7c56c182a490
child 6043 99c8fb13658b
equal deleted inserted replaced
6039:b829e392d192 6040:40cc9da90508
   427 /** Function to give index of a vehicle type
   427 /** Function to give index of a vehicle type
   428  *  Since the return value is 0 for VEH_train, it's perfect for index to arrays
   428  *  Since the return value is 0 for VEH_train, it's perfect for index to arrays
   429  */
   429  */
   430 static inline byte VehTypeToIndex(byte type)
   430 static inline byte VehTypeToIndex(byte type)
   431 {
   431 {
       
   432 	assert(IsPlayerBuildableVehicleType(type));
   432 	return type - VEH_Train;
   433 	return type - VEH_Train;
   433 }
   434 }
   434 
   435 
   435 static inline byte VehTypeToIndex(const Vehicle *v)
   436 static inline byte VehTypeToIndex(const Vehicle *v)
   436 {
   437 {