diff --git a/map.cpp b/map.cpp index 48fa670..5943e28 100644 --- a/map.cpp +++ b/map.cpp @@ -48,8 +48,8 @@ Point Map::place_entity(size_t room_index) { dbc::check(room_index < $rooms.size(), "room_index is out of bounds, not enough rooms"); Room &start = $rooms[room_index]; - // BUG: this can place someone in a wall on accident, move them if they're stuck - return {start.x+1, start.y+1}; + + return {start.x+start.width/2, start.y+start.height/2}; } bool Map::iswall(size_t x, size_t y) { diff --git a/worldbuilder.cpp b/worldbuilder.cpp index 0e0f7ac..896a596 100644 --- a/worldbuilder.cpp +++ b/worldbuilder.cpp @@ -160,7 +160,11 @@ void WorldBuilder::generate() { for(size_t i = 0; i < $map.$rooms.size() - 1; i++) { size_t room_type = Random::uniform(0, room_types.size() - 1); int room_size = Random::uniform(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); + } } }