v0.3.0e: fixed caves levels sometimes spawning traps inside of walls
This commit is contained in:
committed by
Evan Debenham
parent
684c2caacb
commit
14a2d4d8b2
@@ -89,6 +89,7 @@ public class CavesLevel extends RegularLevel {
|
|||||||
int corner = (room.left + 1) + (room.top + 1) * WIDTH;
|
int corner = (room.left + 1) + (room.top + 1) * WIDTH;
|
||||||
if (map[corner - 1] == Terrain.WALL && map[corner - WIDTH] == Terrain.WALL) {
|
if (map[corner - 1] == Terrain.WALL && map[corner - WIDTH] == Terrain.WALL) {
|
||||||
map[corner] = Terrain.WALL;
|
map[corner] = Terrain.WALL;
|
||||||
|
traps.remove(corner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,6 +97,7 @@ public class CavesLevel extends RegularLevel {
|
|||||||
int corner = (room.right - 1) + (room.top + 1) * WIDTH;
|
int corner = (room.right - 1) + (room.top + 1) * WIDTH;
|
||||||
if (map[corner + 1] == Terrain.WALL && map[corner - WIDTH] == Terrain.WALL) {
|
if (map[corner + 1] == Terrain.WALL && map[corner - WIDTH] == Terrain.WALL) {
|
||||||
map[corner] = Terrain.WALL;
|
map[corner] = Terrain.WALL;
|
||||||
|
traps.remove(corner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,6 +105,7 @@ public class CavesLevel extends RegularLevel {
|
|||||||
int corner = (room.left + 1) + (room.bottom - 1) * WIDTH;
|
int corner = (room.left + 1) + (room.bottom - 1) * WIDTH;
|
||||||
if (map[corner - 1] == Terrain.WALL && map[corner + WIDTH] == Terrain.WALL) {
|
if (map[corner - 1] == Terrain.WALL && map[corner + WIDTH] == Terrain.WALL) {
|
||||||
map[corner] = Terrain.WALL;
|
map[corner] = Terrain.WALL;
|
||||||
|
traps.remove(corner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,6 +113,7 @@ public class CavesLevel extends RegularLevel {
|
|||||||
int corner = (room.right - 1) + (room.bottom - 1) * WIDTH;
|
int corner = (room.right - 1) + (room.bottom - 1) * WIDTH;
|
||||||
if (map[corner + 1] == Terrain.WALL && map[corner + WIDTH] == Terrain.WALL) {
|
if (map[corner + 1] == Terrain.WALL && map[corner + WIDTH] == Terrain.WALL) {
|
||||||
map[corner] = Terrain.WALL;
|
map[corner] = Terrain.WALL;
|
||||||
|
traps.remove(corner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user