mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
Emergency projectile fix #42544
Okay, oranges was right and I'm stupid. Stops the server from crashing from a beam rifle, jesus.
This commit is contained in:
@@ -7,9 +7,7 @@
|
||||
return TRUE
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = mover
|
||||
if(P.can_hit_target(src, P.permutated, src == P.original, TRUE))
|
||||
P.Bump(src)
|
||||
return TRUE
|
||||
return !P.can_hit_target(src, P.permutated, src == P.original, TRUE)
|
||||
if(mover.throwing)
|
||||
return (!density || !(mobility_flags & MOBILITY_STAND))
|
||||
if(buckled == mover)
|
||||
|
||||
@@ -565,7 +565,7 @@
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam/prehit(atom/target)
|
||||
qdel(src)
|
||||
return BULLET_ACT_HIT
|
||||
return FALSE
|
||||
|
||||
/obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam/on_hit()
|
||||
qdel(src)
|
||||
|
||||
@@ -230,13 +230,6 @@
|
||||
if(hitscan)
|
||||
store_hitscan_collision(pcache)
|
||||
return TRUE
|
||||
if(firer && !ignore_source_check)
|
||||
var/mob/checking = firer
|
||||
if((A == firer) || (((A in firer.buckled_mobs) || (istype(checking) && (A == checking.buckled))) && (A != original)) || (A == firer.loc && ismecha(A))) //cannot shoot yourself or your mech
|
||||
trajectory_ignore_forcemove = TRUE
|
||||
forceMove(T)
|
||||
trajectory_ignore_forcemove = FALSE
|
||||
return FALSE
|
||||
|
||||
var/distance = get_dist(T, starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations.
|
||||
def_zone = ran_zone(def_zone, max(100-(7*distance), 5)) //Lower accurancy/longer range tradeoff. 7 is a balanced number to use.
|
||||
@@ -529,6 +522,10 @@
|
||||
/obj/item/projectile/proc/can_hit_target(atom/target, list/passthrough, direct_target = FALSE, ignore_loc = FALSE)
|
||||
if(QDELETED(target))
|
||||
return FALSE
|
||||
if(!ignore_source_check && firer)
|
||||
var/mob/M = firer
|
||||
if((target == firer) || ((target == firer.loc) && ismecha(firer.loc)) || (target in firer.buckled_mobs) || (istype(M) && (M.buckled == target)))
|
||||
return FALSE
|
||||
if(!ignore_loc && (loc != target.loc))
|
||||
return FALSE
|
||||
if(target in passthrough)
|
||||
|
||||
Reference in New Issue
Block a user