fix pixel shift

This commit is contained in:
SandPoot
2023-02-27 19:36:01 -03:00
parent f0dcf824a7
commit a1823e7ca8
2 changed files with 8 additions and 5 deletions
@@ -91,9 +91,15 @@
if(pixel_x < -PASSABLE_SHIFT_THRESHOLD)
passthroughable |= NORTH | EAST | SOUTH
/mob/living/Login()
. = ..()
if(is_shifted)
client?.pixel_x = pixel_x - base_pixel_x
client?.pixel_y = pixel_y - base_pixel_y
/mob/living/CanAllowThrough(atom/movable/mover, turf/target)
// Make sure to not allow projectiles of any kind past where they normally wouldn't.
if(!istype(mover, /obj/item/projectile) && !mover.throwing && passthroughable & mover.dir)
if(!istype(mover, /obj/item/projectile) && !mover.throwing && passthroughable & get_dir(src, mover))
return TRUE
return ..()