Skip to content

Commit

Permalink
Fixed wrong gun mode after closing targeting UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
ipcyborg committed Sep 28, 2019
1 parent b59c207 commit 68a0477
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/avatar_action.cpp
Expand Up @@ -772,6 +772,9 @@ bool avatar_action::fire( avatar &you, map &m )
m.draw( g->w_terrain, you.pos() );
std::vector<tripoint> trajectory = target_handler().target_ui( you, args );

//may be changed in target_ui
gun = args.relevant->gun_current_mode();

if( trajectory.empty() ) {
bool not_aiming = you.activity.id() != activity_id( "ACT_AIM" );
if( not_aiming && gun->has_flag( "RELOAD_AND_SHOOT" ) ) {
Expand Down

0 comments on commit 68a0477

Please sign in to comment.