mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-16 04:21:25 +01:00
Fix for strange bug preventing people (sometimes) from walking down
over ledges/stairs. Changed behaviour if players are allowed to fly but seem to fly too fast.
This commit is contained in:
parent
b8e3aeabd4
commit
6bdec962b2
@ -3,7 +3,7 @@ name: NoCheat
|
||||
author: Evenprime
|
||||
|
||||
main: cc.co.evenprime.bukkit.nocheat.NoCheat
|
||||
version: 1.11
|
||||
version: 1.11a
|
||||
|
||||
softdepend: [ Permissions, CraftIRC ]
|
||||
|
||||
|
@ -121,6 +121,11 @@ public class MovingCheck extends Check {
|
||||
if(flyCheck) {
|
||||
result += Math.max(0D, flyingCheck.check(player, from, fromOnGround, to, toOnGround, data));
|
||||
}
|
||||
else
|
||||
{
|
||||
// If players are allowed to fly, there's no need to remember the last location on ground
|
||||
data.setBackPoint = from;
|
||||
}
|
||||
|
||||
if(runCheck) {
|
||||
result += Math.max(0D, runningCheck.check(from, to,
|
||||
@ -131,22 +136,20 @@ public class MovingCheck extends Check {
|
||||
|
||||
data.jumpPhase++;
|
||||
|
||||
if(result <= 0) {
|
||||
if(fromOnGround) {
|
||||
data.setBackPoint = from;
|
||||
data.jumpPhase = 0;
|
||||
}
|
||||
else if(toOnGround) {
|
||||
data.jumpPhase = 0;
|
||||
}
|
||||
}
|
||||
else if(result > 0) {
|
||||
if(fromOnGround) {
|
||||
data.setBackPoint = from;
|
||||
data.jumpPhase = 0;
|
||||
}
|
||||
else if(result <= 0 && toOnGround) {
|
||||
data.jumpPhase = 0;
|
||||
}
|
||||
|
||||
if(result > 0) {
|
||||
// Increment violation counter
|
||||
data.violationLevel += result;
|
||||
if(data.setBackPoint == null) data.setBackPoint = from;
|
||||
}
|
||||
|
||||
|
||||
if(result > 0 && data.violationLevel > 1) {
|
||||
|
||||
setupSummaryTask(player, data);
|
||||
|
Loading…
Reference in New Issue
Block a user