diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 05f6ae163e..788bd70aea 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,6 +1,7 @@ 0.3.3+ (in development) ------------------------------------------------------------------------ - Feature: [#14071] “Vandals stopped” statistic for security guards. +- Fix: [#11829] Visual glitches and crashes when using RCT1 assets from mismatched or corrupt CSG1.DAT and CSG1i.DAT files. - Fix: [#13894] Block brakes do not animate. 0.3.3 (2021-03-13) diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index 06007c8c19..a1873c0ccf 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -1000,7 +1000,7 @@ bool RCT1DataPresentAtLocation(const utf8* path) bool CsgIsUsable(const rct_gx& csg) { - return csg.header.num_entries == RCT1_NUM_LL_CSG_ENTRIES; + return csg.header.total_size == RCT1_LL_CSG1_DAT_FILE_SIZE && csg.header.num_entries == RCT1_NUM_LL_CSG_ENTRIES; } bool CsgAtLocationIsUsable(const utf8* path) diff --git a/src/openrct2/rct1/RCT1.h b/src/openrct2/rct1/RCT1.h index 3f3c951144..94d3e916f7 100644 --- a/src/openrct2/rct1/RCT1.h +++ b/src/openrct2/rct1/RCT1.h @@ -29,6 +29,7 @@ constexpr const uint16_t RCT1_MAX_ANIMATED_OBJECTS = 1000; constexpr const uint8_t RCT1_MAX_BANNERS = 100; constexpr int32_t RCT1_COORDS_Z_STEP = 4; constexpr const uint32_t RCT1_NUM_LL_CSG_ENTRIES = 69917; +constexpr const uint32_t RCT1_LL_CSG1_DAT_FILE_SIZE = 41402869; struct ParkLoadResult;