forked from noxious/server
Re added the movement interruption code to allow overwriting movement
Still needs tinkering
This commit is contained in:
parent
ce80eb223c
commit
9a016a1fb6
@ -21,9 +21,10 @@ export default class CharacterMove extends BaseEvent {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// If already moving, ignore new movement request
|
// If already moving, cancel current movement and wait for it to fully stop
|
||||||
if (zoneCharacter.isMoving) {
|
if (zoneCharacter.isMoving) {
|
||||||
return
|
zoneCharacter.isMoving = false
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 50))
|
||||||
}
|
}
|
||||||
|
|
||||||
const path = await this.characterService.calculatePath(zoneCharacter.character, positionX, positionY)
|
const path = await this.characterService.calculatePath(zoneCharacter.character, positionX, positionY)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user