Skip to content

Commit

Permalink
Remove 2-tile-tall hole against the ceiling.
Browse files Browse the repository at this point in the history
Maybe I shuld remove the ceiling
  • Loading branch information
albertvaka committed Mar 15, 2024
1 parent ca5e2ba commit 8981609
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scene_hellcross.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void HellCrossScene::RandomizeMap() {
for (int y = 0; y < map.Height(); y++) {
for (int x = start_x; x < map.Width(); x++) {
Tile t = Tile::NONE;
if ((y != 1) && (y == 0 || map.GetTile(x, y - 1) == Tile::NONE) && (y < 3 || map.GetTile(x, y - 3) == Tile::NONE)) { // do not stack solid blocks, do not create 2-tile-tall gaps
if ((y != 2) && (y == 0 || map.GetTile(x, y - 1) == Tile::NONE) && (y < 3 || map.GetTile(x, y - 3) == Tile::NONE)) { // do not stack solid blocks, do not create 2-tile-tall gaps
if (x > 0 && map.GetTile(x - 1, y) != Tile::NONE && Rand::rollf() < 0.33f) {
t = map.GetTile(x - 1, y); // continue previous block type so we create horizontal platforms
} else if (y != map.Height()-1 && Rand::rollf() < 0.05f) {
Expand Down

0 comments on commit 8981609

Please sign in to comment.