forked from MagicBane/Server
region work
This commit is contained in:
@@ -79,7 +79,7 @@ public class ChangeAltitudeHandler extends AbstractClientMsgHandler {
|
||||
float startAlt = 0;
|
||||
Building regionBuilding = Regions.GetBuildingForRegion(upRegion);
|
||||
if (upRegion != null)
|
||||
startAlt = upRegion.lerpY(pc) - regionBuilding.getLoc().y;
|
||||
startAlt = upRegion.lerpY(pc.loc) - regionBuilding.getLoc().y;
|
||||
float rounded = startAlt * .10f;
|
||||
|
||||
rounded = ((int) rounded) * 10;
|
||||
@@ -143,7 +143,7 @@ public class ChangeAltitudeHandler extends AbstractClientMsgHandler {
|
||||
float landingAltitude = 0;
|
||||
Building building = Regions.GetBuildingForRegion(region);
|
||||
if (building != null)
|
||||
landingAltitude = region.lerpY(pc) - building.getLoc().y;
|
||||
landingAltitude = region.lerpY(pc.loc) - building.getLoc().y;
|
||||
|
||||
if (landingAltitude >= targetAlt) {
|
||||
pc.landingRegion = region;
|
||||
|
||||
Reference in New Issue
Block a user