Fix #11829: Glitches when using mismatched csg1/csg1i

This commit is contained in:
Michael Steenbeek authored and GitHub committed 2021-03-17 13:40:45 +01:00
1 parent 4d152d97d2
commit e89c37e7ae
3 files changed
+3 -1

No files matched your search

+1
View File
@@ -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)
+1 -1
View File
@@ -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)
+1
View File
@@ -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;