final touch up

This commit is contained in:
2023-10-18 20:21:26 -05:00
parent 7a1700cec3
commit e991a01b50
@@ -993,6 +993,8 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
//look for region in the building we are in
for (Regions regionCycle : building.getBounds().getRegions()) {
float regionHeight = regionCycle.highLerp.y - regionCycle.lowLerp.y;
if(regionHeight < 10)
regionHeight = 10;
if (regionCycle.isPointInPolygon(value) && Math.abs(regionCycle.highLerp.y - value.y) < regionHeight)
region = regionCycle;
}