forked from noxious/server
Minor fix
This commit is contained in:
parent
84ca1f412b
commit
756b558864
@ -16,7 +16,7 @@ export default class CharacterMoveEvent {
|
|||||||
private characterMoveService: CharacterMoveService
|
private characterMoveService: CharacterMoveService
|
||||||
private zoneEventTileService: ZoneEventTileService
|
private zoneEventTileService: ZoneEventTileService
|
||||||
private movementValidator: MovementValidator
|
private movementValidator: MovementValidator
|
||||||
private nextPath: {[index: number]: {character: ExtendedCharacter, path: {x: number, y: number}[]}} = [];
|
private nextPath: {[index: number]: {x: number, y: number}[]} = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly io: Server,
|
private readonly io: Server,
|
||||||
@ -47,10 +47,7 @@ export default class CharacterMoveEvent {
|
|||||||
|
|
||||||
if(character.isMoving && !character.resetMovement) {
|
if(character.isMoving && !character.resetMovement) {
|
||||||
character.resetMovement = true;
|
character.resetMovement = true;
|
||||||
this.nextPath[character.id] = {
|
this.nextPath[character.id] = path;
|
||||||
character,
|
|
||||||
path
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
await this.moveAlongPath(character, path)
|
await this.moveAlongPath(character, path)
|
||||||
}
|
}
|
||||||
@ -69,7 +66,7 @@ export default class CharacterMoveEvent {
|
|||||||
character.isMoving = false;
|
character.isMoving = false;
|
||||||
character.resetMovement = false;
|
character.resetMovement = false;
|
||||||
const nextPath = this.nextPath[character.id];
|
const nextPath = this.nextPath[character.id];
|
||||||
this.moveAlongPath(nextPath.character, nextPath.path);
|
this.moveAlongPath(character, nextPath);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user