mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-27 02:48:04 +01:00
CF: Ensure unused horizontal speed is not used for upwards speeding.
This commit is contained in:
parent
f28877f097
commit
0fb3c562ed
@ -128,9 +128,9 @@ public class CreativeFly extends Check {
|
||||
|
||||
// Super simple, just check distance compared to max distance vertical.
|
||||
// TODO: max descending speed ! [max fall speed, use maximum with speed or added ?]
|
||||
final double resultV = Math.max(0D, yDistance - data.verticalFreedom - limitV) * 100D;
|
||||
final double resultV = (yDistance - data.verticalFreedom - limitV) * 100D;
|
||||
|
||||
final double result = resultH + resultV;
|
||||
final double result = Math.max(0.0, resultH) + Math.max(0D, resultV);
|
||||
|
||||
// The player went to far, either horizontal or vertical.
|
||||
if (result > 0D) {
|
||||
|
Loading…
Reference in New Issue
Block a user