World builder does a better job of placing entities in rooms and not walls.
This commit is contained in:
parent
03c5546cdf
commit
8d661b785b
2 changed files with 7 additions and 3 deletions
|
@ -160,7 +160,11 @@ void WorldBuilder::generate() {
|
|||
for(size_t i = 0; i < $map.$rooms.size() - 1; i++) {
|
||||
size_t room_type = Random::uniform<size_t>(0, room_types.size() - 1);
|
||||
int room_size = Random::uniform<int>(100, 800);
|
||||
stylize_room(i, room_types[room_type], room_size * 0.01f);
|
||||
string tile_name = room_types[room_type];
|
||||
// BUG: really tiles should be configured as collision or not
|
||||
if(tile_name != "WALL_TILE") {
|
||||
stylize_room(i, tile_name, room_size * 0.01f);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue