geometry: bordermesh: make sure we can still do travel even if a mesh cannot be generated
This commit is contained in:
parent
7e78af38c9
commit
817b6c823a
@ -113,7 +113,16 @@ public class BorderMesh {
|
|||||||
log.warning("Got a null pointer when triangulating, skipping world.");
|
log.warning("Got a null pointer when triangulating, skipping world.");
|
||||||
return false;
|
return false;
|
||||||
} catch (NotEnoughPointsException e) {
|
} 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user