#==============================================================================
#  @> Diagonal Movement ~ Karin's Soulkeeper, 2015
#------------------------------------------------------------------------------
#   v1.0 - May 23 : Started & finished.
#------------------------------------------------------------------------------
#  * Description:
#    This script allows for diagonal movement when two directional keys
#    are pressed at the same time. And that's pretty much it.
#------------------------------------------------------------------------------
#  * To Use:
#    Put this script below Materials and above Main.
#------------------------------------------------------------------------------
#  * Compatibility:
#    This script overwrites Game_Player.move_by_input
#------------------------------------------------------------------------------
#  * Terms:
#    Free to use in any kind of project, with or without credit. I wouldn't
#    really mind. Though I'd appreciate it! (^w^)/
#    Just don't, you know, claim that you made this here script yourself,
#    Because that's just mean (._.)
#==============================================================================

#==============================================================================
# ** Modified Class: Game_Player
#==============================================================================
class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # * Overwrite: Processing of Movement via Input from Directional Buttons
  #--------------------------------------------------------------------------
  def move_by_input
    return if !movable? || $game_map.interpreter.running?
    diagonal_movement(Input.dir8) if Input.dir8 > 0
  end
  
  #--------------------------------------------------------------------------
  # * New: Move Diagonally
  #--------------------------------------------------------------------------
  def diagonal_movement(dir)
    case dir
    when 1
      move_diagonal(4, 2)
    when 3
      move_diagonal(6, 2)
    when 7
      move_diagonal(4, 8)
    when 9
      move_diagonal(6, 8)
    else
      move_straight(dir)
      return
    end
    
  end
end