[MIRROR] fixes gibtonite instant hitting , projectile double hitting - not entirely my fault (#3526)
* fixes gibtonite instant hitting , projectile double hitting - not entirely my fault (#31891) * Update projectile.dm * Update projectile.dm * Update projectile.dm * fixes gibtonite instant hitting , projectile double hitting - not entirely my fault
This commit is contained in:
committed by
Poojawa
parent
e867c4ea25
commit
5abe26c765
@@ -205,11 +205,12 @@
|
||||
|
||||
|
||||
/obj/item/projectile/proc/select_target(atom/A) //Selects another target from a wall if we hit a wall.
|
||||
if(!A || !A.density || (A.flags_1 & ON_BORDER_1) || ismob(A)) //if we hit a dense non-border obj or dense turf then we also hit one of the mobs or machines/structures on that tile.
|
||||
if(!A || !A.density || (A.flags_1 & ON_BORDER_1) || ismob(A) || A == original) //if we hit a dense non-border obj or dense turf then we also hit one of the mobs or machines/structures on that tile.
|
||||
return
|
||||
if(A == original || original in A)
|
||||
var/turf/T = get_turf(A)
|
||||
if(original in T)
|
||||
return original
|
||||
var/list/mob/possible_mobs = typecache_filter_list(A, GLOB.typecache_mob)
|
||||
var/list/mob/possible_mobs = typecache_filter_list(T, GLOB.typecache_mob) - A
|
||||
var/list/mob/mobs = list()
|
||||
for(var/i in possible_mobs)
|
||||
var/mob/M = i
|
||||
@@ -219,10 +220,9 @@
|
||||
var/mob/M = safepick(mobs)
|
||||
if(M)
|
||||
return M.lowest_buckled_mob()
|
||||
var/obj/O = safepick(typecache_filter_list(A, GLOB.typecache_machine_or_structure))
|
||||
var/obj/O = safepick(typecache_filter_list(T, GLOB.typecache_machine_or_structure)) - A
|
||||
if(O)
|
||||
return O
|
||||
return A
|
||||
|
||||
/obj/item/projectile/proc/check_ricochet()
|
||||
if(prob(ricochet_chance))
|
||||
|
||||
Reference in New Issue
Block a user