Dynamic glidespeed

ported from yogstation
This commit is contained in:
QuoteFox
2020-10-05 03:58:10 +01:00
parent 5e298aac96
commit 631090cf04
23 changed files with 113 additions and 36 deletions
+3 -1
View File
@@ -68,15 +68,17 @@
// movement process, persists while holder is moving through pipes
/obj/structure/disposalholder/proc/move()
set waitfor = FALSE
var/ticks = 1
var/obj/structure/disposalpipe/last
while(active)
var/obj/structure/disposalpipe/curr = loc
last = curr
set_glide_size(DELAY_TO_GLIDE_SIZE(ticks * world.tick_lag))
curr = curr.transfer(src)
if(!curr && active)
last.expel(src, loc, dir)
stoplag()
ticks = stoplag()
if(!(count--))
active = FALSE