Skip to content

Commit

Permalink
NPCs to use ranged weapons against all enemies, and automatic fire ag…
Browse files Browse the repository at this point in the history
…ainst dangerous enemies (#40089)
  • Loading branch information
zachmmeyer authored Jun 17, 2020
1 parent 973b5b1 commit 32d4bfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/npcmove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ npc_action npc::method_of_attack()
return m.melee() || m.flags.count( "NPC_AVOID" ) ||
!m->ammo_sufficient( m.qty ) || !can_use( *m.target ) ||
m->get_gun_ups_drain() > ups_charges ||
( ( danger <= ( m.qty == 1 ? 3.0 : 15.0 ) ) && !emergency() ) ||
( ( danger <= ( m.qty == 1 ? 0.0 : 15 ) ) && !emergency() ) ||
( rules.has_flag( ally_rule::use_silent ) && is_player_ally() &&
!m.target->is_silent() );

Expand Down Expand Up @@ -1395,7 +1395,7 @@ npc_action npc::method_of_attack()
}

if( dist == 1 && same_z ) {
add_msg( m_debug, "%s is trying a melle attack", disp_name() );
add_msg( m_debug, "%s is trying a melee attack", disp_name() );
return npc_melee;
}

Expand Down

0 comments on commit 32d4bfe

Please sign in to comment.