From 34adaa66e796b5b220d888ed06c973ef4e40502f Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sat, 2 Dec 2023 20:25:45 +0100 Subject: [PATCH] Fix object layer height when loading in set levels --- Source/objects.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/objects.cpp b/Source/objects.cpp index e39cf5f29..5694f8c2d 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -564,7 +564,7 @@ void LoadMapObjects(const char *path, Point start, WorldTileRectangle mapRange = int layer2Offset = 2 + size.width * size.height; // The rest of the layers are at dPiece scale - size.width *= static_cast(2); + size *= static_cast(2); const uint16_t *objectLayer = &dunData[layer2Offset + size.width * size.height * 2]; @@ -3952,7 +3952,7 @@ void SetMapObjects(const uint16_t *dunData, int startx, int starty) int layer2Offset = 2 + size.width * size.height; // The rest of the layers are at dPiece scale - size.width *= static_cast(2); + size *= static_cast(2); const uint16_t *objectLayer = &dunData[layer2Offset + size.width * size.height * 2];