mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-29 02:41:29 +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
|
author: Evenprime
|
||||||
|
|
||||||
main: cc.co.evenprime.bukkit.nocheat.NoCheat
|
main: cc.co.evenprime.bukkit.nocheat.NoCheat
|
||||||
version: 1.11
|
version: 1.11a
|
||||||
|
|
||||||
softdepend: [ Permissions, CraftIRC ]
|
softdepend: [ Permissions, CraftIRC ]
|
||||||
|
|
||||||
|
@ -121,6 +121,11 @@ public class MovingCheck extends Check {
|
|||||||
if(flyCheck) {
|
if(flyCheck) {
|
||||||
result += Math.max(0D, flyingCheck.check(player, from, fromOnGround, to, toOnGround, data));
|
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) {
|
if(runCheck) {
|
||||||
result += Math.max(0D, runningCheck.check(from, to,
|
result += Math.max(0D, runningCheck.check(from, to,
|
||||||
@ -131,22 +136,20 @@ public class MovingCheck extends Check {
|
|||||||
|
|
||||||
data.jumpPhase++;
|
data.jumpPhase++;
|
||||||
|
|
||||||
if(result <= 0) {
|
if(fromOnGround) {
|
||||||
if(fromOnGround) {
|
data.setBackPoint = from;
|
||||||
data.setBackPoint = from;
|
data.jumpPhase = 0;
|
||||||
data.jumpPhase = 0;
|
}
|
||||||
}
|
else if(result <= 0 && toOnGround) {
|
||||||
else if(toOnGround) {
|
data.jumpPhase = 0;
|
||||||
data.jumpPhase = 0;
|
}
|
||||||
}
|
|
||||||
}
|
if(result > 0) {
|
||||||
else if(result > 0) {
|
|
||||||
// Increment violation counter
|
// Increment violation counter
|
||||||
data.violationLevel += result;
|
data.violationLevel += result;
|
||||||
if(data.setBackPoint == null) data.setBackPoint = from;
|
if(data.setBackPoint == null) data.setBackPoint = from;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(result > 0 && data.violationLevel > 1) {
|
if(result > 0 && data.violationLevel > 1) {
|
||||||
|
|
||||||
setupSummaryTask(player, data);
|
setupSummaryTask(player, data);
|
||||||
|
Loading…
Reference in New Issue
Block a user