merge
This commit is contained in:
@@ -362,7 +362,7 @@
|
||||
|
||||
/obj/item/projectile/proc/process_hit(turf/T, atom/target, qdel_self, hit_something = FALSE) //probably needs to be reworked entirely when pixel movement is done.
|
||||
if(QDELETED(src) || !T || !target) //We're done, nothing's left.
|
||||
if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !CHECK_BITFIELD(movement_type, UNSTOPPABLE)))
|
||||
if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !(movement_type & UNSTOPPABLE)))
|
||||
qdel(src)
|
||||
return hit_something
|
||||
permutated |= target //Make sure we're never hitting it again. If we ever run into weirdness with piercing projectiles needing to hit something multiple times.. well.. that's a to-do.
|
||||
@@ -370,16 +370,16 @@
|
||||
return process_hit(T, select_target(T), qdel_self, hit_something) //Hit whatever else we can since that didn't work.
|
||||
var/result = target.bullet_act(src, def_zone)
|
||||
if(result == BULLET_ACT_FORCE_PIERCE)
|
||||
if(!CHECK_BITFIELD(movement_type, UNSTOPPABLE))
|
||||
if(!(movement_type & UNSTOPPABLE))
|
||||
temporary_unstoppable_movement = TRUE
|
||||
ENABLE_BITFIELD(movement_type, UNSTOPPABLE)
|
||||
movement_type |= UNSTOPPABLE
|
||||
return process_hit(T, select_target(T), qdel_self, TRUE) //Hit whatever else we can since we're piercing through but we're still on the same tile.
|
||||
else if(result == BULLET_ACT_TURF) //We hit the turf but instead we're going to also hit something else on it.
|
||||
return process_hit(T, select_target(T), QDEL_SELF, TRUE)
|
||||
else //Whether it hit or blocked, we're done!
|
||||
qdel_self = QDEL_SELF
|
||||
hit_something = TRUE
|
||||
if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !CHECK_BITFIELD(movement_type, UNSTOPPABLE)))
|
||||
if((qdel_self == FORCE_QDEL) || ((qdel_self == QDEL_SELF) && !temporary_unstoppable_movement && !(movement_type & UNSTOPPABLE)))
|
||||
qdel(src)
|
||||
return hit_something
|
||||
|
||||
@@ -775,7 +775,7 @@
|
||||
if(.)
|
||||
if(temporary_unstoppable_movement)
|
||||
temporary_unstoppable_movement = FALSE
|
||||
DISABLE_BITFIELD(movement_type, UNSTOPPABLE)
|
||||
movement_type &= ~(UNSTOPPABLE)
|
||||
if(fired && can_hit_target(original, permutated, TRUE))
|
||||
Bump(original)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user