system enabled

This commit is contained in:
2023-10-26 20:04:11 -05:00
parent 7af63d1519
commit 136c8c4756
6 changed files with 153 additions and 45 deletions
+1 -12
View File
@@ -987,18 +987,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
@Override
public final void setLoc(final Vector3fImmutable value) {
Building building = BuildingManager.getBuildingAtLocation(this.loc);
Regions region = null;
if(building != null) {
//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;
}
}
Regions region = Regions.getRegionAtLocation(value);
float regionHeightOffset = 0;
if(region != null){
this.region = region;