From 9127cd7ec102e64be7b08dd49bbff756ac2debeb Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Wed, 27 Mar 2024 20:39:52 +0300 Subject: [PATCH] [MIRROR] Fix 100k toggle move intent comsig runtimes (#1653) (#2586) * Fix 100k toggle move intent comsig runtimes (#82239) ## About The Pull Request `user` isn't passed in many situations in which `toggle_move_intent` is called and also it's useless to pass `user` because it should just be The Mob * Fix 100k toggle move intent comsig runtimes --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/_onclick/hud/screen_objects.dm | 2 +- code/modules/mob/mob_movement.dm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index d7bd98febda..6de48539004 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -384,7 +384,7 @@ /atom/movable/screen/mov_intent/proc/toggle(mob/living/user) if(!istype(user)) return - user.toggle_move_intent(user) + user.toggle_move_intent() /atom/movable/screen/pull name = "stop pulling" diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index a11ef46c7f2..c62333f7c12 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -493,14 +493,14 @@ set instant = TRUE if(isliving(mob)) var/mob/living/user_mob = mob - user_mob.toggle_move_intent(usr) + user_mob.toggle_move_intent() /** * Toggle the move intent of the mob * * triggers an update the move intent hud as well */ -/mob/living/proc/toggle_move_intent(mob/user) +/mob/living/proc/toggle_move_intent() if(move_intent == MOVE_INTENT_RUN) move_intent = MOVE_INTENT_WALK else @@ -515,7 +515,7 @@ selector.update_appearance() update_move_intent_slowdown() - SEND_SIGNAL(user, COMSIG_MOVE_INTENT_TOGGLED) + SEND_SIGNAL(src, COMSIG_MOVE_INTENT_TOGGLED) ///Moves a mob upwards in z level /mob/verb/up()