Skip to content

Commit a5614f9

Browse files
MaleclypseMaxime Cogney
andauthored
Ignore enemies after autopeek confirmation (#82867)
Co-authored-by: Maxime Cogney <[email protected]>
2 parents 8b9d63d + 54719fd commit a5614f9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/avatar_action.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,13 @@ bool avatar_action::move( avatar &you, map &m, const tripoint_rel_ms &d )
561561
const look_around_result result = g->look_around( false, center, center, false, false, true );
562562
if( result.peek_action != PA_MOVE ) {
563563
g->walk_move( src_loc, via_ramp );
564+
} else {
565+
add_msg( m_info, _( "Ignoring enemy!" ) );
566+
for( auto &elem : you.get_mon_visible().new_seen_mon ) {
567+
monster &critter = *elem;
568+
critter.ignoring = rl_dist( you.pos_bub(), critter.pos_bub() );
569+
}
570+
g->set_safe_mode( SAFE_MODE_ON );
564571
}
565572
return false; // cancel automove
566573
}

0 commit comments

Comments
 (0)