Examples of ValidateLocationInVehicle


Examples of com.l2jfrozen.gameserver.network.serverpackets.ValidateLocationInVehicle

      if(this instanceof L2PcInstance)
      {
        ((L2PcInstance) this).revalidateZone(true);

        if(((L2PcInstance)this).isInBoat())
          broadcastPacket(new ValidateLocationInVehicle(this));
      }
    }
   
    broadcastPacket(new StopMove(this));
    //MAJAX fix
View Full Code Here

Examples of com.l2jfrozen.gameserver.network.serverpackets.ValidateLocationInVehicle

          else
          {
            if(!activeChar.isMoving()){
             
              if(activeChar.isInBoat())
                sendPacket(new ValidateLocationInVehicle(activeChar));
              else
                sendPacket(new ValidateLocation(activeChar));
             
             
            }else if(diffSq > activeChar.getStat().getMoveSpeed())
View Full Code Here

Examples of lineage2.gameserver.network.serverpackets.ValidateLocationInVehicle

   * @return L2GameServerPacket
   */
  @Override
  public L2GameServerPacket validateLocationPacket(Player player)
  {
    return new ValidateLocationInVehicle(player);
  }
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.ValidateLocationInVehicle

                        && diffSq > 10000) // more than can be considered to be result of latency
                {
                    if (Config.DEVELOPER) System.out.println(activeChar.getName() + ": Synchronizing position Server --> Client");
                    if (activeChar.isInBoat())
                    {
                        sendPacket(new ValidateLocationInVehicle(activeChar));
                    }
                    else
                    {
                      activeChar.sendPacket(new ValidateLocation(activeChar));
                    }
                }
            }
            activeChar.setLastClientPosition(_x, _y, _z);
            activeChar.setLastServerPosition(activeChar.getX(), activeChar.getY(), activeChar.getZ());
        }
        else if (Config.COORD_SYNCHRONIZE == -1)
        {
            activeChar.setClientX(_x);
            activeChar.setClientY(_y);
            activeChar.setClientZ(_z);
            activeChar.setClientHeading(_heading);
            int realX = activeChar.getX();
            int realY = activeChar.getY();
            int realZ = activeChar.getZ();

            double dx = _x - realX;
            double dy = _y - realY;
            double diffSq = (dx*dx + dy*dy);
            if (diffSq < 250000)
                activeChar.setXYZ(realX,realY,_z);
            int realHeading = activeChar.getHeading();

            //activeChar.setHeading(_heading);

            //TODO: do we need to validate?
            /*double dx = (_x - realX);
             double dy = (_y - realY);
             double dist = Math.sqrt(dx*dx + dy*dy);
             if ((dist < 500)&&(dist > 2)) //check it wasnt teleportation, and char isn't there yet
             activeChar.sendPacket(new CharMoveToLocation(activeChar));*/

            if (Config.DEBUG) {
                _log.fine("client pos: "+ _x + " "+ _y + " "+ _z +" head "+ _heading);
                _log.fine("server pos: "+ realX + " "+realY+ " "+realZ +" head "+realHeading);
            }

            if (Config.ACTIVATE_POSITION_RECORDER && !activeChar.isFlying() && Universe.getInstance().shouldLog(activeChar.getObjectId()))
                Universe.getInstance().registerHeight(realX, realY, _z);

            if (Config.DEVELOPER)
            {
                if (diffSq > 1000000) {
                    if (Config.DEBUG) _log.fine("client/server dist diff "+ (int)Math.sqrt(diffSq));
                    if (activeChar.isInBoat())
                    {
                        sendPacket(new ValidateLocationInVehicle(activeChar));
                    }
                    else
                    {
                      activeChar.sendPacket(new ValidateLocation(activeChar));
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.