Skip to content

Commit

Permalink
Fix monsters not being spawned on the map (#36691)
Browse files Browse the repository at this point in the history
* Fix monsters not being spawned on the map

* Move some checks back to their place
  • Loading branch information
ZhilkinSerg authored and BevapDin committed Jan 4, 2020
1 parent 9e6c9bf commit 1e7f02e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7239,7 +7239,7 @@ void map::spawn_monsters_submap( const tripoint &gp, bool ignore_sight )
const auto valid_location = [&]( const tripoint & p ) {
// Checking for creatures via g is only meaningful if this is the main game map.
// If it's some local map instance, the coordinates will most likely not even match.
return ( !g || &g->m != this || g->critter_at( p ) ) && tmp.can_move_to( p );
return ( !g || &g->m != this || !g->critter_at( p ) ) && tmp.can_move_to( p );
};

const auto place_it = [&]( const tripoint & p ) {
Expand Down

0 comments on commit 1e7f02e

Please sign in to comment.