--- a/src/npcmove.cpp
+++ b/src/npcmove.cpp
@@ -1409,7 +1409,7 @@
         return npc_reload;
     }
 
-    if( dist == 1 && same_z ) {
+    if( dist <= 1 && same_z ) {
         add_msg( m_debug, "%s is trying a melee attack", disp_name() );
         return npc_melee;
     }