mirror of https://github.com/OpenRCT2/OpenRCT2.git
Enable boosters when loading vehicle
This commit is contained in:
parent
69ea33452b
commit
f60148c374
|
@ -20,6 +20,7 @@
|
||||||
#include "../core/Util.hpp"
|
#include "../core/Util.hpp"
|
||||||
#include "ObjectRepository.h"
|
#include "ObjectRepository.h"
|
||||||
#include "RideObject.h"
|
#include "RideObject.h"
|
||||||
|
#include "../ride/track.h"
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
|
@ -79,6 +80,21 @@ void RideObject::ReadLegacy(IReadObjectContext * context, IStream * stream)
|
||||||
if (gConfigInterface.select_by_track_type) {
|
if (gConfigInterface.select_by_track_type) {
|
||||||
_legacyType.enabledTrackPieces = 0xFFFFFFFFFFFFFFFF;
|
_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);
|
GetStringTable()->Read(context, stream, OBJ_STRING_ID_CAPACITY);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue