mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 12:33:17 +01:00
Enable boosters when loading vehicle
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "../core/Util.hpp"
|
||||
#include "ObjectRepository.h"
|
||||
#include "RideObject.h"
|
||||
#include "../ride/track.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -79,6 +80,21 @@ void RideObject::ReadLegacy(IReadObjectContext * context, IStream * stream)
|
||||
if (gConfigInterface.select_by_track_type) {
|
||||
_legacyType.enabledTrackPieces = 0xFFFFFFFFFFFFFFFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
// When not in select by track type mode, add boosters if the track type is eligible
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (_legacyType.ride_type[i] == RIDE_TYPE_LOOPING_ROLLER_COASTER ||
|
||||
_legacyType.ride_type[i] == RIDE_TYPE_CORKSCREW_ROLLER_COASTER ||
|
||||
_legacyType.ride_type[i] == RIDE_TYPE_TWISTER_ROLLER_COASTER ||
|
||||
_legacyType.ride_type[i] == RIDE_TYPE_VERTICAL_DROP_ROLLER_COASTER ||
|
||||
_legacyType.ride_type[i] == RIDE_TYPE_GIGA_COASTER ||
|
||||
_legacyType.ride_type[i] == RIDE_TYPE_JUNIOR_ROLLER_COASTER) {
|
||||
|
||||
_legacyType.enabledTrackPieces |= (1ULL << TRACK_BOOSTER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GetStringTable()->Read(context, stream, OBJ_STRING_ID_CAPACITY);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user