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 zoneEventTileService: ZoneEventTileService
|
||||
private movementValidator: MovementValidator
|
||||
private nextPath: {[index: number]: {character: ExtendedCharacter, path: {x: number, y: number}[]}} = [];
|
||||
private nextPath: {[index: number]: {x: number, y: number}[]} = [];
|
||||
|
||||
constructor(
|
||||
private readonly io: Server,
|
||||
@ -47,10 +47,7 @@ export default class CharacterMoveEvent {
|
||||
|
||||
if(character.isMoving && !character.resetMovement) {
|
||||
character.resetMovement = true;
|
||||
this.nextPath[character.id] = {
|
||||
character,
|
||||
path
|
||||
}
|
||||
this.nextPath[character.id] = path;
|
||||
} else {
|
||||
await this.moveAlongPath(character, path)
|
||||
}
|
||||
@ -69,7 +66,7 @@ export default class CharacterMoveEvent {
|
||||
character.isMoving = false;
|
||||
character.resetMovement = false;
|
||||
const nextPath = this.nextPath[character.id];
|
||||
this.moveAlongPath(nextPath.character, nextPath.path);
|
||||
this.moveAlongPath(character, nextPath);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user