Closed jpadkins closed 2 years ago
I'll look into this, as I recall it may be a bug as those performance checks generally are not performance-heavy. Most of my recent development time has been devoted to preparing for the GoRogue v3 release, but I'll try and get this back-ported to 2.x as well once I track it down since it's rather limiting behavior. Thank you for reporting this!
Hey, I believe I've found some unintended behavior with FleeMap.
Here is a snippet to reproduce:
The
.Update()
call at the end will raiseTo fix this, the outer edges can be set to
GoalState.Obstacle
:The above snippet no longer raises the exception.
I think the issue would be fixed if one or both of these lines also checked if the Coord was in bounds of the map (similar to how GoalMap checks if the Coord is contained in the walkable set): https://github.com/Chris3606/GoRogue/blob/master/GoRogue/Pathing/FleeMap.cs#L160 https://github.com/Chris3606/GoRogue/blob/master/GoRogue/Pathing/FleeMap.cs#L170 But I haven't had time yet to test it.
Or perhaps is this intentional behavior for performance reasons?