From d164e3d407956e9f07abdb0866df6596149a02ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Mon, 14 Jun 2021 18:07:41 +0200 Subject: [PATCH] fixing bomb stopper entity generation --- sources/Map/Map.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/Map/Map.cpp b/sources/Map/Map.cpp index ed646dd2..f0333198 100644 --- a/sources/Map/Map.cpp +++ b/sources/Map/Map.cpp @@ -135,7 +135,7 @@ namespace BBM static const std::string unbreakableObj = unbreakableWallPath + objExtension; static const std::string unbreakablePnj = unbreakableWallPath + imageExtension; - for (int i = 0; i < height; i++) { + for (int i = 0; i < height + 1; i++) { scene->addEntity("Bomb stopper") .addComponent(-1, 0, i) .addComponent>(); @@ -143,7 +143,7 @@ namespace BBM .addComponent(width + 1, 0, i) .addComponent>(); } - for (int i = 0; i < width; i++) { + for (int i = 0; i < width + 1; i++) { scene->addEntity("Bomb stopper") .addComponent(i, 0, -1) .addComponent>();