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
4
map.cpp
4
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue