mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-21 06:51:26 +01:00
Reset jumpphase and setback for moving in/onto laddrs/vines in any case.
This commit is contained in:
parent
2aea67b463
commit
2cf9f5f9f8
@ -250,19 +250,25 @@ public class SurvivalFly extends Check {
|
|||||||
data.setBack = to.getLocation();
|
data.setBack = to.getLocation();
|
||||||
data.setBack.setY(Math.ceil(data.setBack.getY()));
|
data.setBack.setY(Math.ceil(data.setBack.getY()));
|
||||||
data.survivalFlyJumpPhase = 0;
|
data.survivalFlyJumpPhase = 0;
|
||||||
} else if ((to.isInWeb() || to.isOnLadder() || toOnGround)
|
} else if (to.isOnLadder()
|
||||||
&& (from.getY() >= to.getY() || data.setBack.getY() <= Math.floor(to.getY()))) {
|
|| (to.isInWeb() || toOnGround) && (from.getY() >= to.getY() || data.setBack.getY() <= Math.floor(to.getY()))) {
|
||||||
// If the player moved down "onto" the ground and the new setback point is higher up than the old or at
|
// Set set back and jump phase, if:
|
||||||
// least at the same height, or if the player is in web or on a ladder.
|
// 1. Moving onto ladder/vine.
|
||||||
|
/*
|
||||||
|
* 2. If the player moved down "onto" the ground or in web and ...
|
||||||
|
* the new setback point is higher up than the old or at
|
||||||
|
* least at the same height.
|
||||||
|
*/
|
||||||
data.setBack = to.getLocation();
|
data.setBack = to.getLocation();
|
||||||
data.survivalFlyJumpPhase = 0;
|
data.survivalFlyJumpPhase = 0;
|
||||||
} else {
|
} else {
|
||||||
if (from.isInLiquid() || fromOnGround || from.isInWeb() || from.isOnLadder())
|
if (from.isInLiquid() || fromOnGround || from.isInWeb() || from.isOnLadder()){
|
||||||
data.setBack = from.getLocation();
|
data.setBack = from.getLocation();
|
||||||
if (from.isInLiquid() || to.isInLiquid() || from.isInWeb() || to.isInWeb() || fromOnGround
|
if ( to.isInLiquid() || to.isInWeb() || toOnGround || to.isOnLadder()){
|
||||||
|| toOnGround || from.isOnLadder() || to.isOnLadder())
|
// The player at least touched the ground somehow.
|
||||||
// The player at least touched the ground somehow.
|
data.survivalFlyJumpPhase = 0;
|
||||||
data.survivalFlyJumpPhase = 0;
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user