geometry: bordermesh: make sure we can still do travel even if a mesh cannot be generated
This commit is contained in:
parent
5ad959a02f
commit
89830a1904
@ -113,7 +113,16 @@ public class BorderMesh {
|
||||
log.warning("Got a null pointer when triangulating, skipping world.");
|
||||
return false;
|
||||
} catch (NotEnoughPointsException e) {
|
||||
log.info("Not enough points to triangulate mesh. Add more regions!");
|
||||
log.info("Not enough points to triangulate mesh, all regions will be connected to each other. Add more regions!");
|
||||
for(Region region : m_regions) {
|
||||
HashSet<Region> neighbors = new HashSet<Region>();
|
||||
for(Region neighbor : m_regions) {
|
||||
if (neighbor != region) {
|
||||
neighbors.add(neighbor);
|
||||
}
|
||||
}
|
||||
m_neighbors.put(region, neighbors);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user