From f086908e087bbf29eaa2045f17ebf6de525023b9 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 5 Nov 2018 22:41:38 +0100 Subject: controller/gamecontext: ignore weird projection points rather than stopping movement altogether --- src/controller/gamecontext.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/controller') diff --git a/src/controller/gamecontext.ts b/src/controller/gamecontext.ts index 4ae449a..f0a3346 100644 --- a/src/controller/gamecontext.ts +++ b/src/controller/gamecontext.ts @@ -115,7 +115,7 @@ export class GameContext { if (!vec2.exactEquals(dest, dest2)) { // Ensure termination if (vec2.squaredDistance(this.entityPos, dest2) >= vec2.squaredDistance(this.entityPos, dest)) - return; + continue; vec2.copy(dest, dest2); rescan = true; -- cgit v1.2.3