easystarjs
easystarjs copied to clipboard
Fix corner cutting of `pointsToAvoid`
trafficstars
When corner cutting is enabled it was still possible to cut corners of points to avoid. Checking pointsToAvoid in isTileWalkable prevents cutting through these corners.
Not 100% sure if this behaviour is appropriate in all situations or if this should become a separate setting?
This makes sense to me. Do you mind adding a new unit test which succeeds with this change, but would fail previously?
I've added the unit test. When commenting out my previous change it will fail by finding a path through the corners of the points marked to avoid.