Skip to content

Commit

Permalink
Merge pull request #34294 from ipcyborg/fix-33594-fire-mode
Browse files Browse the repository at this point in the history
Fixed wrong gun mode after closing targeting UI.
  • Loading branch information
ZhilkinSerg committed Sep 28, 2019
2 parents b59c207 + 68a0477 commit fcc1976
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 fcc1976

Please sign in to comment.