Final changes to moving-check + version bump

This commit is contained in:
Evenprime 2011-03-09 18:32:42 +01:00
parent ad9d14dee1
commit 5df7af20b3
3 changed files with 20 additions and 14 deletions

View File

@ -3,7 +3,7 @@ name: NoCheatPlugin
author: Evenprime
main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin
version: 0.6.4c
version: 0.6.5
commands:
nocheat:

View File

@ -453,19 +453,27 @@ public class MovingCheck {
return d > (double)i ? i : i - 1;
}
public static int lowerBorder(double d1) {
public static int lowerBorder(double d1) {
double floor = Math.floor(d1);
double d4 = (d1 - floor) - magic;
//System.out.println(d4);
return (int) (floor + d4);
double d4 = floor + magic;
if(d4 <= d1)
d4 = 0;
else
d4 = 1;
return (int) (floor - d4);
}
public static int upperBorder(double d1) {
double floor = Math.floor(d1);
double d4 = (d1 - floor) - magic2;
//System.out.println(d4);
int tmp = (int) (floor - d4);
double d4 = floor + magic2;
return tmp < floor ? tmp + 2 : (int)floor ;
if(d4 < d1)
d4 = -1;
else
d4 = 0;
return (int) (floor - d4);
}
}

View File

@ -13,9 +13,7 @@ public class NoCheatEntityListener extends EntityListener {
@Override
public void onEntityDamage(EntityDamageEvent event) {
if(event.getEntity() instanceof Player) {
Player p = (Player)event.getEntity();
NoCheatPlugin.getPlayerData(p).movingJumpPhase = 0;