Send new location as array instead of object

This commit is contained in:
Dennis Postma 2025-02-16 17:19:19 +01:00
parent d819a84a37
commit ad611ef593

View File

@ -42,10 +42,7 @@ export function useGameControlsComposable(scene: Phaser.Scene, layer: Phaser.Til
function emitMovement(x: number, y: number) { function emitMovement(x: number, y: number) {
if (x === currentPosition.x && y === currentPosition.y) return if (x === currentPosition.x && y === currentPosition.y) return
gameStore.connection?.emit(SocketEvent.MAP_CHARACTER_MOVE, { gameStore.connection?.emit(SocketEvent.MAP_CHARACTER_MOVE, [x, y])
positionX: x,
positionY: y
})
currentPosition = { x, y } currentPosition = { x, y }
} }