diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index f8256c392d3..fe7551010e2 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -172,7 +172,8 @@ var/atom/oldloc = loc if(loc != newloc) - glide_for(movetime) + if(movetime > 0) + glide_for(movetime) if(!(direct & (direct - 1))) //Cardinal move . = ..(newloc, direct) // don't pass up movetime else //Diagonal move, split it into cardinal moves @@ -181,45 +182,45 @@ // The `&& moving_diagonally` checks are so that a forceMove taking // place due to a Crossed, Bumped, etc. call will interrupt // the second half of the diagonal movement, or the second attempt - // at a first half if ..() fails because we hit something. + // at a first half if the cardinal Move() fails because we hit something. if(direct & NORTH) if(direct & EAST) - if(..(get_step(src, NORTH), NORTH) && moving_diagonally) + if(Move(get_step(src, NORTH), NORTH) && moving_diagonally) first_step_dir = NORTH moving_diagonally = SECOND_DIAG_STEP - . = ..(get_step(src, EAST), EAST) - else if(moving_diagonally && ..(get_step(src, EAST), EAST)) + . = Move(get_step(src, EAST), EAST) + else if(moving_diagonally && Move(get_step(src, EAST), EAST)) first_step_dir = EAST moving_diagonally = SECOND_DIAG_STEP - . = ..(get_step(src, NORTH), NORTH) + . = Move(get_step(src, NORTH), NORTH) else if(direct & WEST) - if(..(get_step(src, NORTH), NORTH) && moving_diagonally) + if(Move(get_step(src, NORTH), NORTH) && moving_diagonally) first_step_dir = NORTH moving_diagonally = SECOND_DIAG_STEP - . = ..(get_step(src, WEST), WEST) - else if(moving_diagonally && ..(get_step(src, WEST), WEST)) + . = Move(get_step(src, WEST), WEST) + else if(moving_diagonally && Move(get_step(src, WEST), WEST)) first_step_dir = WEST moving_diagonally = SECOND_DIAG_STEP - . = ..(get_step(src, NORTH), NORTH) + . = Move(get_step(src, NORTH), NORTH) else if(direct & SOUTH) if(direct & EAST) - if(..(get_step(src, SOUTH), SOUTH) && moving_diagonally) + if(Move(get_step(src, SOUTH), SOUTH) && moving_diagonally) first_step_dir = SOUTH moving_diagonally = SECOND_DIAG_STEP - . = ..(get_step(src, EAST), EAST) - else if(moving_diagonally && ..(get_step(src, EAST), EAST)) + . = Move(get_step(src, EAST), EAST) + else if(moving_diagonally && Move(get_step(src, EAST), EAST)) first_step_dir = EAST moving_diagonally = SECOND_DIAG_STEP - . = ..(get_step(src, SOUTH), SOUTH) + . = Move(get_step(src, SOUTH), SOUTH) else if(direct & WEST) - if(..(get_step(src, SOUTH), SOUTH) && moving_diagonally) + if(Move(get_step(src, SOUTH), SOUTH) && moving_diagonally) first_step_dir = SOUTH moving_diagonally = SECOND_DIAG_STEP - . = ..(get_step(src, WEST), WEST) - else if(moving_diagonally && ..(get_step(src, WEST), WEST)) + . = Move(get_step(src, WEST), WEST) + else if(moving_diagonally && Move(get_step(src, WEST), WEST)) first_step_dir = WEST moving_diagonally = SECOND_DIAG_STEP - . = ..(get_step(src, SOUTH), SOUTH) + . = Move(get_step(src, SOUTH), SOUTH) if(moving_diagonally == SECOND_DIAG_STEP) if(!.) setDir(first_step_dir)