throw an exception if no path found when using player.moveTo command. Cancelling path following no longer rejects the promise
This commit is contained in:
@@ -35,9 +35,7 @@ export class GameSceneUserInputHandler implements UserInputHandlerInterface {
|
||||
.then((path) => {
|
||||
// Remove first step as it is for the tile we are currently standing on
|
||||
path.shift();
|
||||
this.gameScene.CurrentPlayer.setPathToFollow(path).catch((reason) => {
|
||||
console.warn(reason);
|
||||
});
|
||||
this.gameScene.CurrentPlayer.setPathToFollow(path).catch((reason) => {});
|
||||
})
|
||||
.catch((reason) => {
|
||||
console.warn(reason);
|
||||
|
||||
Reference in New Issue
Block a user