From 6c9e73bff287ad5cbb3ac33623a0550e71c6dec0 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 28 Sep 2017 21:42:58 +0200 Subject: [PATCH] Allow loading objects from RCTC These are technically same as those from RCT2, but with a .POB extension, rather than .DAT --- src/openrct2/object/ObjectRepository.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2/object/ObjectRepository.cpp b/src/openrct2/object/ObjectRepository.cpp index 2445ddfced..28b18610f3 100644 --- a/src/openrct2/object/ObjectRepository.cpp +++ b/src/openrct2/object/ObjectRepository.cpp @@ -80,7 +80,7 @@ class ObjectFileIndex final : public FileIndex private: static constexpr uint32 MAGIC_NUMBER = 0x5844494F; // OIDX static constexpr uint16 VERSION = 15; - static constexpr auto PATTERN = "*.dat"; + static constexpr auto PATTERN = "*.dat;*.pob"; public: ObjectFileIndex(IPlatformEnvironment * env) : @@ -125,7 +125,7 @@ protected: switch (item.ObjectEntry.flags & 0x0F) { case OBJECT_TYPE_RIDE: stream->WriteValue(item.RideFlags); - for (sint32 i = 0; i < 2; i++) + for (sint32 i = 0; i < MAX_CATEGORIES_PER_RIDE; i++) { stream->WriteValue(item.RideCategory[i]); }