Cancel click-to-move when keyboard input is detected to improve player control responsiveness

This commit is contained in:
Z. Cliffe Schreuders
2025-11-22 01:30:44 +00:00
parent ac727f4422
commit 83055f7589

View File

@@ -442,6 +442,12 @@ export function updatePlayerMovement() {
}
function updatePlayerKeyboardMovement() {
// Cancel click-to-move when keyboard input is detected
if (isMoving || targetPoint) {
isMoving = false;
targetPoint = null;
}
// Calculate movement direction based on keyboard input
let dirX = 0;
let dirY = 0;