building and region lookup completed

This commit is contained in:
2023-10-18 18:45:50 -05:00
parent b928bedeb6
commit 7886aa6041
3 changed files with 14 additions and 8 deletions
+1 -1
View File
@@ -991,7 +991,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
if(building != null){
//look for region in the building we are in
for(Regions regionCycle : building.getBounds().getRegions())
if(regionCycle.isPointInPolygon(value))
if(regionCycle.isPointInPolygon(value) && Math.abs(regionCycle.highLerp.y - value.y) < 10)
region = regionCycle;
}
float regionHeightOffset = 0;