From 9590420f5f7595021771c216f3129827a0591b37 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Thu, 7 May 2026 12:23:50 +0200 Subject: Fix unit stopping when destination is occupied by another unit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a unit arrived exactly MOVE_SPEED away from its destination, it would move there via moveToward rather than snapping. On the next tick, its own cell appeared blocked in the moveMap, triggering a repath to an adjacent cell — causing infinite oscillation. Fix by excluding the unit's own current cell from the blocked check before repathing. Also adds repath-to-adjacent logic so units that arrive while the destination is genuinely occupied by someone else settle next to it instead of stopping mid-journey. Co-Authored-By: Claude Sonnet 4.6 --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 7a24235..07f4bf7 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ ## Bugs -- [ ] stops moving if someone settles at destination +- [x] stops moving if someone settles at destination +- [ ] spawner spawns 2 units instead of 1 ## Dependencies -- cgit v1.3