diff --git a/sources/Map/Map.cpp b/sources/Map/Map.cpp index b5ca0268..44190315 100644 --- a/sources/Map/Map.cpp +++ b/sources/Map/Map.cpp @@ -72,9 +72,25 @@ namespace BBM static const std::string unbreakableObj = unbreakableWallPath + objExtension; static const std::string unbreakablePnj = unbreakableWallPath + imageExtension; + for (int i = 0; i < height; i++) { + scene->addEntity("Bomb stopper") + .addComponent(-1, 0, i) + .addComponent>(); + scene->addEntity("Bomb stopper") + .addComponent(width + 1, 0, i) + .addComponent>(); + } + for (int i = 0; i < width; i++) { + scene->addEntity("Bomb stopper") + .addComponent(i, 0, -1) + .addComponent>(); + scene->addEntity("Bomb stopper") + .addComponent(i, 0, height + 1) + .addComponent>(); + } + scene->addEntity("Bottom Wall") .addComponent(Vector3f((width + 1) / 2, 0, -1)) - .addComponent>() .addComponent( WAL::Callback(), &MapGenerator::wallCollide, Vector3f(-(width + 1) / 2 , 0.25, 0.25), Vector3f(width + 1, 2, 0.75)) @@ -83,7 +99,6 @@ namespace BBM RAY::Vector3(width + 3, 1, 1)); scene->addEntity("Upper Wall") .addComponent(Vector3f((width + 1) / 2, 0, height + 1)) - .addComponent>() .addComponent( WAL::Callback(), &MapGenerator::wallCollide, Vector3f(-(width + 1) / 2 , 0.25, 0.25), Vector3f(width + 1, 2, 0.75)) @@ -92,7 +107,6 @@ namespace BBM RAY::Vector3(width + 3, 1, 1)); scene->addEntity("Left Wall") .addComponent(Vector3f(width + 1, 0, height / 2)) - .addComponent>() .addComponent( WAL::Callback(), &MapGenerator::wallCollide, Vector3f(0.25, 0.25, -(height + 1) / 2 ), Vector3f(0.75, 2, height + 1))