equal
deleted
inserted
replaced
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 { |