File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1437,11 +1437,14 @@ shared_ptr_fast<npc> overmapbuffer::find_npc_by_unique_id( const std::string &un
1437
1437
1438
1438
std::optional<basecamp *> overmapbuffer::find_camp ( const point_abs_omt &p )
1439
1439
{
1440
- const overmap_with_local_coords om_loc = get_existing_om_global ( p );
1441
- if ( !!om_loc.om ) {
1442
- std::optional<basecamp *> camp = om_loc.om ->find_camp ( p );
1443
- if ( !!camp ) {
1444
- return camp;
1440
+ for ( auto &it : overmaps ) {
1441
+ const point_abs_omt p2 ( p );
1442
+ for ( int x2 = p2.x () - 3 ; x2 < p2.x () + 3 ; x2++ ) {
1443
+ for ( int y2 = p2.y () - 3 ; y2 < p2.y () + 3 ; y2++ ) {
1444
+ if ( std::optional<basecamp *> camp = it.second ->find_camp ( point_abs_omt ( x2, y2 ) ) ) {
1445
+ return camp;
1446
+ }
1447
+ }
1445
1448
}
1446
1449
}
1447
1450
return std::nullopt ;
You can’t perform that action at this time.
0 commit comments