mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-17 10:58:19 +01:00
Dynamic glidespeed
ported from yogstation
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
return FALSE
|
||||
//We are now going to move
|
||||
var/add_delay = mob.movement_delay()
|
||||
mob.set_glide_size(DELAY_TO_GLIDE_SIZE(add_delay * (((direct & 3) && (direct & 12)) ? 2 : 1))) // set it now in case of pulled objects
|
||||
if(old_move_delay + (add_delay*MOVEMENT_DELAY_BUFFER_DELTA) + MOVEMENT_DELAY_BUFFER > world.time)
|
||||
move_delay = old_move_delay
|
||||
else
|
||||
@@ -109,6 +110,7 @@
|
||||
if((direct & (direct - 1)) && mob.loc == n) //moved diagonally successfully
|
||||
add_delay *= 2
|
||||
move_delay += add_delay
|
||||
mob.set_glide_size(DELAY_TO_GLIDE_SIZE(add_delay))
|
||||
if(.) // If mob is null here, we deserve the runtime
|
||||
if(mob.throwing)
|
||||
mob.throwing.finalize(FALSE)
|
||||
@@ -364,14 +366,12 @@
|
||||
/mob/proc/toggle_move_intent(mob/user)
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
m_intent = MOVE_INTENT_WALK
|
||||
glide_size = 4
|
||||
else
|
||||
m_intent = MOVE_INTENT_RUN
|
||||
glide_size = 8
|
||||
if(hud_used && hud_used.static_inventory)
|
||||
for(var/obj/screen/mov_intent/selector in hud_used.static_inventory)
|
||||
selector.update_icon(src)
|
||||
|
||||
|
||||
/mob/verb/up()
|
||||
set name = "Move Upwards"
|
||||
set category = "IC"
|
||||
@@ -402,4 +402,4 @@
|
||||
return TRUE
|
||||
|
||||
/mob/proc/canZMove(direction, turf/target)
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user