Skip to content

Commit

Permalink
[MIRROR] Fix 100k toggle move intent comsig runtimes (#1653) (#2586)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: MrMelbert <[email protected]>
  • Loading branch information
3 people authored Mar 27, 2024
1 parent 0201610 commit 9127cd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/mob_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit 9127cd7

Please sign in to comment.