L2JLisvus

Would you like to react to this message? Create an account in a few clicks or log in to continue.

3 posters

    fix when players cross the floor

    avatar
    pablo699


    Posts : 9
    Join date : 2015-05-25

    fix when players cross the floor Empty fix when players cross the floor

    Post  pablo699 1st November 2019, 14:25

    This fix will teleport characters to old position, to avoid cross the floor.

    ValidatePosition.java

    Code:


          if (activeChar.isFlying() || activeChar.isInsideZone(L2Character.ZONE_WATER))
          {
             activeChar.setXYZ(realX, realY, _z);
             if (diffSq > 90000)
             {
                activeChar.sendPacket(new ValidateLocation(activeChar));
             }
          }
    +
    +      int deltaZ = activeChar.getZ() - _z;
    +      if (deltaZ > 1024)
    +      {
    +         int zLocation = GeoData.getInstance().getHeight(activeChar.getX(), activeChar.getY(), activeChar.getZ());
    +         activeChar.teleToLocation(activeChar.getX(), activeChar.getY(), zLocation);
    +         if (activeChar.isGM())
    +         {
    +            activeChar.sendMessage("Geodata Log (Admin): Last position restored.");
    +         }
    +         return;
    +      }

          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
             {
                activeChar.setXYZ(realX, realY, _z);
                return;
             }
    avatar
    pablo699


    Posts : 9
    Join date : 2015-05-25

    fix when players cross the floor Empty Re: fix when players cross the floor

    Post  pablo699 2nd November 2019, 13:52

    Here is the video :

    DnR likes this post

    avatar
    confejulian


    Posts : 254
    Join date : 2016-08-27

    fix when players cross the floor Empty Re: fix when players cross the floor

    Post  confejulian 2nd November 2019, 18:54

    nice, thanks Smile
    avatar
    Vito33


    Posts : 22
    Join date : 2014-09-13

    fix when players cross the floor Empty Re: fix when players cross the floor

    Post  Vito33 3rd November 2019, 16:32

    cool fix, thanks m8
    avatar
    pablo699


    Posts : 9
    Join date : 2015-05-25

    fix when players cross the floor Empty Re: fix when players cross the floor

    Post  pablo699 3rd November 2019, 18:12

    np, enjoy Smile

    Sponsored content


    fix when players cross the floor Empty Re: fix when players cross the floor

    Post  Sponsored content


      Current date/time is 19th May 2024, 07:38