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
@@ -129,12 +129,13 @@
if(current_tube == null)
setDir(next_dir)
Move(get_step(loc, dir), dir) // Allow collisions when leaving the tubes.
Move(get_step(loc, dir), dir, DELAY_TO_GLIDE_SIZE(exit_delay)) // Allow collisions when leaving the tubes.
break
last_delay = current_tube.enter_delay(src, next_dir)
sleep(last_delay)
setDir(next_dir)
set_glide_size(DELAY_TO_GLIDE_SIZE(last_delay + exit_delay))
forceMove(next_loc) // When moving from one tube to another, skip collision and such.
if(current_tube && current_tube.should_stop_pod(src, next_dir))