Skip to content

Commit

Permalink
Fix diagonal footsteps
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMelbert committed Jun 27, 2024
1 parent 61ea99b commit 770d555
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions code/datums/elements/footstep.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
/datum/element/footstep/proc/play_simplestep(mob/living/source, atom/oldloc, direction, forced, list/old_locs, momentum_change)
SIGNAL_HANDLER

if (forced || SHOULD_DISABLE_FOOTSTEPS(source))
if (forced || SHOULD_DISABLE_FOOTSTEPS(source) || source.moving_diagonally == SECOND_DIAG_STEP)
return

var/list/prepared_steps = prepare_step(source)
Expand All @@ -122,7 +122,7 @@
/datum/element/footstep/proc/play_humanstep(mob/living/carbon/human/source, atom/oldloc, direction, forced, list/old_locs, momentum_change)
SIGNAL_HANDLER

if (forced || SHOULD_DISABLE_FOOTSTEPS(source) || !momentum_change)
if (forced || SHOULD_DISABLE_FOOTSTEPS(source) || !momentum_change || source.moving_diagonally == SECOND_DIAG_STEP)
return

var/volume_multiplier = 1
Expand Down Expand Up @@ -172,7 +172,7 @@
/datum/element/footstep/proc/play_simplestep_machine(atom/movable/source, atom/oldloc, direction, forced, list/old_locs, momentum_change)
SIGNAL_HANDLER

if (forced || SHOULD_DISABLE_FOOTSTEPS(source))
if (forced || SHOULD_DISABLE_FOOTSTEPS(source) || source.moving_diagonally == SECOND_DIAG_STEP)
return

var/turf/open/source_loc = get_turf(source)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

/mob/living/carbon/human/Move(NewLoc, direct)
. = ..()
if(shoes && body_position == STANDING_UP && loc == NewLoc && has_gravity(loc))
if(shoes && !moving_diagonally && body_position == STANDING_UP && loc == NewLoc && has_gravity(loc))
SEND_SIGNAL(shoes, COMSIG_SHOES_STEP_ACTION)

/mob/living/carbon/human/Process_Spacemove(movement_dir = 0, continuous_move = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion maplestation_modules/code/datums/elements/shoe_footstep.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
SIGNAL_HANDLER

var/mob/living/carbon/human/owner = source.loc
if(CHECK_MOVE_LOOP_FLAGS(owner, MOVEMENT_LOOP_OUTSIDE_CONTROL))
if(CHECK_MOVE_LOOP_FLAGS(owner, MOVEMENT_LOOP_OUTSIDE_CONTROL) || owner.moving_diagonally == SECOND_DIAG_STEP)
return
if(owner.move_intent == MOVE_INTENT_SNEAK || (owner.movement_type & (VENTCRAWLING|FLYING|FLOATING)))
return
Expand Down

0 comments on commit 770d555

Please sign in to comment.