"flying.heightlimit" is now relative to worldheight

This commit is contained in:
Evenprime 2012-03-02 16:12:15 +01:00
parent e209e52ff4
commit a358243d6c
4 changed files with 9 additions and 6 deletions

View File

@ -550,8 +550,9 @@
flyingheightlimit:
What is the maximum height (in blocks) that a player may reach by
flying. Some servers experience lag when players fly very, very high.
This value is how far above the map height a player may fly.
flying, relative to the max world height he is in. Some servers
experience lag when players fly very, very high. This value is how
far above the map height a player may fly.
actions:
What should happen if a player flies faster/higher than defined here?

View File

@ -42,10 +42,12 @@ public class FlyingCheck extends MovingCheck {
// Before doing anything, do a basic height check to determine if
// players are flying too high
if(to.y - data.vertFreedom > ccmoving.flyingHeightLimit) {
int maxheight = ccmoving.flyingHeightLimit + player.getPlayer().getWorld().getMaxHeight();
if(to.y - data.vertFreedom > maxheight) {
newToLocation = new PreciseLocation();
newToLocation.set(setBack);
newToLocation.y = ccmoving.flyingHeightLimit - 10;
newToLocation.y = maxheight - 10;
return newToLocation;
}

View File

@ -35,7 +35,7 @@ public class MovingConfig implements ConfigItem {
public final boolean morePacketsCheck;
public final ActionList morePacketsActions;
public final double flyingHeightLimit;
public final int flyingHeightLimit;
public MovingConfig(NoCheatConfiguration data) {

View File

@ -49,7 +49,7 @@ public class DefaultConfiguration extends NoCheatConfiguration {
set(ConfPaths.MOVING_RUNFLY_FLYING_ALLOWINCREATIVE, true);
set(ConfPaths.MOVING_RUNFLY_FLYING_SPEEDLIMITHORIZONTAL, 60);
set(ConfPaths.MOVING_RUNFLY_FLYING_SPEEDLIMITVERTICAL, 100);
set(ConfPaths.MOVING_RUNFLY_FLYING_HEIGHTLIMIT, 250);
set(ConfPaths.MOVING_RUNFLY_FLYING_HEIGHTLIMIT, 128);
set(ConfPaths.MOVING_RUNFLY_FLYING_ACTIONS, "log:moveshort:3:5:f cancel vl>100 log:moveshort:0:5:if cancel vl>400 log:movelong:0:5:cif cancel");
set(ConfPaths.MOVING_MOREPACKETS_CHECK, true);