Attmept 3 to fix vehicles.

This commit is contained in:
asofold 2012-08-12 05:51:12 +02:00
parent c0e771f0ac
commit acd7b53ca8
2 changed files with 9 additions and 3 deletions

View File

@ -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);

View File

@ -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