mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-02 00:29:59 +01:00
Attmept 3 to fix vehicles.
This commit is contained in:
parent
c0e771f0ac
commit
acd7b53ca8
@ -488,7 +488,7 @@ public class MovingListener implements Listener {
|
||||
|
||||
Location newTo = null;
|
||||
|
||||
// Emergency fix:
|
||||
// Emergency fix attempt:
|
||||
final MovingData data = MovingData.getData(player);
|
||||
data.clearFlyData();
|
||||
player.setFallDistance(0.0f);
|
||||
|
@ -48,13 +48,19 @@ public class NoFall extends Check {
|
||||
public void check(final Player player, final PlayerLocation from, final PlayerLocation to) {
|
||||
final MovingConfig cc = MovingConfig.getConfig(player);
|
||||
final MovingData data = MovingData.getData(player);
|
||||
|
||||
|
||||
if (player.isInsideVehicle()){
|
||||
// Emergency fix attempt:
|
||||
data.noFallFallDistance = 0; // Hope the vehicle move does the rest.
|
||||
return;
|
||||
}
|
||||
|
||||
// If the player has just started falling, is falling into a liquid, in web or is on a ladder.
|
||||
if (to.isInLiquid() || to.isInWeb() || to.isOnLadder())
|
||||
// Reset his fall distance.
|
||||
data.noFallFallDistance = 0D;
|
||||
|
||||
data.noFallFallDistance = data.noFallFallDistance;
|
||||
data.noFallFallDistance = data.noFallFallDistance; // TODO: ??
|
||||
|
||||
// If the player just touched the ground for the server, but no for the client.
|
||||
if (!data.noFallWasOnGroundServer && data.noFallOnGroundServer
|
||||
|
Loading…
Reference in New Issue
Block a user