Browse Source

final touch up

magicbox-1.5.2
FatBoy-DOTC 1 year ago
parent
commit
e991a01b50
  1. 2
      src/engine/objects/AbstractCharacter.java

2
src/engine/objects/AbstractCharacter.java

@ -993,6 +993,8 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
//look for region in the building we are in //look for region in the building we are in
for (Regions regionCycle : building.getBounds().getRegions()) { for (Regions regionCycle : building.getBounds().getRegions()) {
float regionHeight = regionCycle.highLerp.y - regionCycle.lowLerp.y; 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) if (regionCycle.isPointInPolygon(value) && Math.abs(regionCycle.highLerp.y - value.y) < regionHeight)
region = regionCycle; region = regionCycle;
} }

Loading…
Cancel
Save