Merge pull request #9623 from farie82/Point-blank-shooting

Fixes point blank shots not hitting the correct target if multiple people are on the same tile.
This commit is contained in:
variableundefined
2018-09-28 20:59:27 +08:00
committed by GitHub
+6
View File
@@ -40,6 +40,12 @@
if(!istype(targloc) || !istype(curloc) || !BB)
return 0
BB.ammo_casing = src
if(target && get_dist(user, target) <= 1) //Point blank shot must always hit
target.bullet_act(BB, BB.def_zone)
QDEL_NULL(BB)
return 1
if(targloc == curloc)
if(target) //if the target is right on our location we go straight to bullet_act()
target.bullet_act(BB, BB.def_zone)