Game_Player.prototype.moveByInput = function() {
if (!this.startedMoving() && this.canMove()) {
if (this.triggerAction()) return;
var direction = QMovement.diagonal ? Input.dir8 : Input.dir4;
if (direction > 0) {
this.clearMouseMove();
} else if ($gameTemp.isDestinationValid()) {
if (!QMovement.moveOnClick) {
$gameTemp.clearDestination();
return;
}
this.requestMouseMove();
if (this._requestMouseMove) {
var x = $gameTemp.destinationPX();
var y = $gameTemp.destinationPY();
return this.moveByMouse(x, y);
}
}
if (Imported.QInput && Input.preferGamepad() && $gameMap.offGrid()) {
this.moveWithAnalog();
} else {
if ([4, 6].contains(direction)) {
this.moveInputHorizontal(direction);
} else if ([2, 8].contains(direction) && (!$gameSwitches.value(1))) {
this.moveInputVertical(direction);
} else if ([1, 3, 7, 9].contains(direction) && QMovement.diagonal) {
this.moveInputDiagonal(direction);
}
}
}
};