From 85bf8565079dcb7802a18ad8e6a5ae69f68d4c49 Mon Sep 17 00:00:00 2001 From: Askou Date: Thu, 17 Jun 2021 17:23:28 +0200 Subject: [PATCH] remove unbreakbable on height --- sources/Map/Map.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sources/Map/Map.cpp b/sources/Map/Map.cpp index d1d70223..3d20ef71 100644 --- a/sources/Map/Map.cpp +++ b/sources/Map/Map.cpp @@ -450,10 +450,12 @@ namespace BBM map[std::make_tuple(i, 0, j)] = BREAKABLE; } } - if (!isNotClassic) - map = createClassicUnbreakable(map, width, height); - else - map = createLongClassicUnbreakable(map, width, height); + if (!isHeight) { + if (!isNotClassic) + map = createClassicUnbreakable(map, width, height); + else + map = createLongClassicUnbreakable(map, width, height); + } if (isHeight) map = createHeight(map, width, height); map = cleanBreakable(map, width, height); @@ -461,7 +463,7 @@ namespace BBM } void MapGenerator::generateHeightCollision(MapBlock map, int width, int height, std::shared_ptr scene) - { + { int floor = 2; for (int i = 0; i < width + 1; i++) {