diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 07b5319432..91067852a9 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -74,7 +74,7 @@ public class ValidatePosition extends GameClientPacket { dx = _x - player.getInBoatPosition().getX(); dy = _y - player.getInBoatPosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -95,11 +95,11 @@ public class ValidatePosition extends GameClientPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } if (player.isFlying() || player.isInsideZone(ZoneId.WATER)) @@ -112,8 +112,7 @@ public class ValidatePosition extends GameClientPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -147,8 +146,6 @@ public class ValidatePosition extends GameClientPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -156,6 +153,10 @@ public class ValidatePosition extends GameClientPacket } else { + if (player.isFalling(_z)) + { + player.setXYZ(realX, realY, _z); + } player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index b158fe79e2..77ed466f9d 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index b158fe79e2..77ed466f9d 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } } diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java index 94f071161b..07482d8413 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/ValidatePosition.java @@ -61,12 +61,6 @@ public class ValidatePosition implements IClientIncomingPacket final int realY = player.getY(); int realZ = player.getZ(); - if (Config.DEVELOPER) - { - LOGGER.finer("client pos: " + _x + " " + _y + " " + _z + " head " + _heading); - LOGGER.finer("server pos: " + realX + " " + realY + " " + realZ + " head " + player.getHeading()); - } - if ((_x == 0) && (_y == 0)) { if (realX != 0) @@ -86,7 +80,7 @@ public class ValidatePosition implements IClientIncomingPacket { dx = _x - player.getInVehiclePosition().getX(); dy = _y - player.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dz = _z - player.getInVehiclePosition().getZ(); diffSq = ((dx * dx) + (dy * dy)); if (diffSq > 250000) { @@ -100,13 +94,13 @@ public class ValidatePosition implements IClientIncomingPacket // Zoey76: TODO: Implement or cleanup. // if (Config.COORD_SYNCHRONIZE == 2) // { - // dx = _x - activeChar.getInVehiclePosition().getX(); - // dy = _y - activeChar.getInVehiclePosition().getY(); - // dz = _z - activeChar.getInVehiclePosition().getZ(); + // dx = _x - player.getInVehiclePosition().getX(); + // dy = _y - player.getInVehiclePosition().getY(); + // dz = _z - player.getInVehiclePosition().getZ(); // diffSq = ((dx * dx) + (dy * dy)); // if (diffSq > 250000) // { - // sendPacket(new GetOnVehicle(activeChar.getObjectId(), _data, activeChar.getInBoatPosition())); + // sendPacket(new GetOnVehicle(player.getObjectId(), _data, player.getInBoatPosition())); // } // } return; @@ -123,11 +117,11 @@ public class ValidatePosition implements IClientIncomingPacket diffSq = ((dx * dx) + (dy * dy)); // Zoey76: TODO: Implement or cleanup. - // Party party = activeChar.getParty(); - // if ((party != null) && (activeChar.getLastPartyPositionDistance(_x, _y, _z) > 150)) + // Party party = player.getParty(); + // if ((party != null) && (player.getLastPartyPositionDistance(_x, _y, _z) > 150)) // { // player.setLastPartyPosition(_x, _y, _z); - // party.broadcastToPartyMembers(activeChar, new PartyMemberPosition(activeChar)); + // party.broadcastToPartyMembers(player, new PartyMemberPosition(player)); // } // Don't allow flying transformations outside gracia area! @@ -146,8 +140,7 @@ public class ValidatePosition implements IClientIncomingPacket } else if (diffSq < 360000) // if too large, messes observation { - if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, - // mainly used when no geodata but can be used also with geodata + if (Config.COORD_SYNCHRONIZE == -1) // Only Z coordinate synched to server, mainly used when no geodata but can be used also with geodata { player.setXYZ(realX, realY, _z); return; @@ -181,8 +174,6 @@ public class ValidatePosition implements IClientIncomingPacket // Important: this code part must work together with Creature.updatePosition if ((diffSq > 250000) || (Math.abs(dz) > 200)) { - // if ((_z - activeChar.getClientZ()) < 200 && Math.abs(activeChar.getLastServerPosition().getZ()-realZ) > 70) - if ((Math.abs(dz) > 200) && (Math.abs(dz) < 1500) && (Math.abs(_z - player.getClientZ()) < 800)) { player.setXYZ(realX, realY, _z); @@ -190,11 +181,10 @@ public class ValidatePosition implements IClientIncomingPacket } else { - if (Config.DEVELOPER) + if (player.isFalling(_z)) { - LOGGER.info(player.getName() + ": Synchronizing position Server --> Client"); + player.setXYZ(realX, realY, _z); } - player.sendPacket(new ValidateLocation(player)); } }