forked from noxious/client
Teleport walk fix
This commit is contained in:
parent
bc0db8b32b
commit
9a8220e4e0
@ -43,6 +43,9 @@ export function useGameControlsComposable(scene: Phaser.Scene, layer: Phaser.Til
|
|||||||
if (x === currentPosition.x && y === currentPosition.y) return
|
if (x === currentPosition.x && y === currentPosition.y) return
|
||||||
|
|
||||||
gameStore.connection?.emit(SocketEvent.MAP_CHARACTER_MOVE, [x, y])
|
gameStore.connection?.emit(SocketEvent.MAP_CHARACTER_MOVE, [x, y])
|
||||||
|
gameStore.connection?.on(SocketEvent.MAP_CHARACTER_MOVE, ([characterId, posX, posY, rot, isMoving]: [string, number, number, number, boolean]) => {
|
||||||
|
currentPosition = { x: posX, y: posY }
|
||||||
|
})
|
||||||
|
|
||||||
currentPosition = { x, y }
|
currentPosition = { x, y }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user