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:
@@ -84,7 +84,7 @@ export class WorkadventurePlayerCommands extends IframeApiContribution<Workadven
|
||||
});
|
||||
}
|
||||
|
||||
public async moveTo(x: number, y: number, speed?: number): Promise<{ x: number; y: number }> {
|
||||
public async moveTo(x: number, y: number, speed?: number): Promise<{ x: number; y: number; cancelled: boolean }> {
|
||||
return await queryWorkadventure({
|
||||
type: "movePlayerTo",
|
||||
data: { x, y, speed },
|
||||
|
||||
Reference in New Issue
Block a user