fixes the bug where you can sometimes get permanently stuck sprinting when using the sprint hotkey (#8033)
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
/mob/living/carbon/human/key_down(_key, client/user)
|
||||
switch(_key)
|
||||
if("Shift")
|
||||
togglesprint()
|
||||
sprint_hotkey(TRUE)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/key_up(_key, client/user)
|
||||
switch(_key)
|
||||
if("Shift")
|
||||
togglesprint()
|
||||
sprint_hotkey(FALSE)
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/mob/living/silicon/robot/key_down(_key, client/user)
|
||||
switch(_key)
|
||||
if("Shift")
|
||||
togglesprint()
|
||||
sprint_hotkey(TRUE)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/key_up(_key, client/user)
|
||||
switch(_key)
|
||||
if("Shift")
|
||||
togglesprint()
|
||||
sprint_hotkey(FALSE)
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -31,3 +31,7 @@
|
||||
for(var/obj/screen/sprintbutton/selector in hud_used.static_inventory)
|
||||
selector.insert_witty_toggle_joke_here(src)
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/proc/sprint_hotkey(targetstatus)
|
||||
if(targetstatus ? !sprinting : sprinting)
|
||||
togglesprint()
|
||||
|
||||
@@ -23,3 +23,7 @@
|
||||
for(var/obj/screen/sprintbutton/selector in hud_used.static_inventory)
|
||||
selector.insert_witty_toggle_joke_here(src)
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/robot/proc/sprint_hotkey(targetstatus)
|
||||
if(targetstatus ? !sprinting : sprinting)
|
||||
togglesprint()
|
||||
|
||||
Reference in New Issue
Block a user