Fixes space movement pushing jank (#18024)

* 👾

* comment

* Sirryan2002 Suggestion

* Forgot facing dir lock

* SteelSlayer Suggestion

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
Kugamo
2022-06-22 00:45:17 -05:00
committed by GitHub
co-authored by SteelSlayer
parent 4f5c3376e3
commit 1c2cec06d1
+4 -2
View File
@@ -299,7 +299,7 @@
/mob/Process_Spacemove(movement_dir = 0)
if(..())
return 1
var/atom/movable/backup = get_spacemove_backup()
var/atom/movable/backup = get_spacemove_backup(movement_dir)
if(backup)
if(istype(backup) && movement_dir && !backup.anchored)
var/opposite_dir = turn(movement_dir, 180)
@@ -308,7 +308,7 @@
return 1
return 0
/mob/get_spacemove_backup()
/mob/get_spacemove_backup(movement_dir)
for(var/A in orange(1, get_turf(src)))
if(isarea(A))
continue
@@ -328,6 +328,8 @@
return AM
if(pulling == AM)
continue
if(get_turf(AM) == get_step(get_turf(src), movement_dir)) // No pushing off objects in front of you, while simultaneously pushing them fowards to go faster in space.
continue
. = AM