L2JMobius

Free Users => General Discussion => Topic started by: iherephone on January 03, 2021, 03:03:45 PM

Title: Ask for permission to inquire about completeness
Post by: iherephone on January 03, 2021, 03:03:45 PM
Hello all admin and staff.
I am wondering if the free L2 High5 server is able to use all game systems 100% or not.
And from the test I encountered a bug from falling from a height and piercing the scene. Is there a solution to this problem?

* Sorry for the language that I use. It comes from a translation program *
Title: Re: Ask for permission to inquire about completeness
Post by: G-hamsteR on January 03, 2021, 03:19:10 PM
Hello,

There are no 100% complete java projects. L2jmobius H5 is stable and can be used for a live server without major problems.

The problem you mentioned is caused by your geodata. You must create your own or find shared geodata files.

Feel free to report any bugs that you may encounter with or without their fixes.
Title: Re: Ask for permission to inquire about completeness
Post by: Mobius on January 03, 2021, 03:32:15 PM
And from the test I encountered a bug from falling from a height and piercing the scene. Is there a solution to this problem?

That should not happen on L2jMobius.
If it does, provide a video with retail server comparison.
Title: Re: Ask for permission to inquire about completeness
Post by: iherephone on January 06, 2021, 07:31:45 PM
And from the test I encountered a bug from falling from a height and piercing the scene. Is there a solution to this problem?

That should not happen on L2jMobius.
If it does, provide a video with retail server comparison.

Thank you and the team for replying
This is a video showing the birth of a bug through the scene.

https://youtu.be/dW22EnxKty4
Title: Re: Ask for permission to inquire about completeness
Post by: Mobius on January 06, 2021, 09:04:30 PM
Use /loc to tell us location coordinates.
Title: Re: Ask for permission to inquire about completeness
Post by: iherephone on January 06, 2021, 09:20:04 PM
Use /loc to tell us location coordinates.

It is in many areas That is high enough

https://ibb.co/VWpTFgC
Title: Re: Ask for permission to inquire about completeness
Post by: Mobius on January 06, 2021, 10:59:10 PM
Try this.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (revision 7949)
+++ java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (working copy)
@@ -13426,6 +13426,11 @@
  }
  if (_fallingDamageTask != null)
  {
+ final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
+ if (getZ() < nearestZ)
+ {
+ teleToLocation(new Location(getX(), getY(), nearestZ));
+ }
  _fallingDamageTask.cancel(true);
  }
  _fallingDamageTask = ThreadPool.schedule(() ->

Please do extensive tests because this can cause many problems if it is not proper.
If it works, also test without geodata.
Title: Re: Ask for permission to inquire about completeness
Post by: iherephone on January 06, 2021, 11:54:24 PM
Try this.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (revision 7949)
+++ java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (working copy)
@@ -13426,6 +13426,11 @@
  }
  if (_fallingDamageTask != null)
  {
+ final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
+ if (getZ() < nearestZ)
+ {
+ teleToLocation(new Location(getX(), getY(), nearestZ));
+ }
  _fallingDamageTask.cancel(true);
  }
  _fallingDamageTask = ThreadPool.schedule(() ->

Please do extensive tests because this can cause many problems if it is not proper.
If it works, also test without geodata.


Where do I have to go to fix it?
Title: Re: Ask for permission to inquire about completeness
Post by: Mobius on January 07, 2021, 12:50:34 AM
Copy patch in clipboard (ctrl+c).
Right click on project.
Team.
Apply patch.
Title: Re: Ask for permission to inquire about completeness
Post by: Mobius on January 08, 2021, 02:46:47 AM
Added a configuration for it with https://bitbucket.org/MobiusDev/l2j_mobius/commits/5f4c6a37e89337e0624e49765453f66b558c051d
Title: Re: Ask for permission to inquire about completeness
Post by: iherephone on January 09, 2021, 07:36:15 PM
Copy patch in clipboard (ctrl+c).
Right click on project.
Team.
Apply patch.

Sorry to you
The code that you provided I don't understand how and where to use it.
So as not to bother you too much So I tried to figure out how to use it. But failed
I would like to pester you more for this.

Now, because of this, I am starting to learn Java.

Title: Re: Ask for permission to inquire about completeness
Post by: Helionar on January 11, 2021, 12:15:49 PM
If you want to apply the simplified patch without a config variable, you'll just need to insert 5 lines of code in PlayerInstance.java, as Mobius shared above.

Try this.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (revision 7949)
+++ java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (working copy)
@@ -13426,6 +13426,11 @@
  }
  if (_fallingDamageTask != null)
  {
+ final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
+ if (getZ() < nearestZ)
+ {
+ teleToLocation(new Location(getX(), getY(), nearestZ));
+ }
  _fallingDamageTask.cancel(true);
  }
  _fallingDamageTask = ThreadPool.schedule(() ->

Please do extensive tests because this can cause many problems if it is not proper.
If it works, also test without geodata.

Yon can apply it as a patch (copy all the provided patch, right click project on Eclipse > Team > Apply Patch...) or manually in the case you have some customs that can interfere with the patch provided, but i doubt it will be the case  :)

For further understanding of what this patch does:

final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());

Store the nearest Z value of the world (Z is relative to Height).

if (getZ() < nearestZ)

Check if Player's Z position is below the nearest world Z position.

teleToLocation(new Location(getX(), getY(), nearestZ));

Teleports the Player to the same X and Y coordinates, but replaces his Z position with the nearest world Z value, so it gets bumped to the surface.

If you are new to Java (or new to OOP in general), you should try to analyze code this way, line by line and step by step. Also, try to learn the project structure, so it will be easier to understand how thing works and making further changes. You can find PlayerInstance.java inside java/org/l2jmobius/gameserver/model/actor/instance for example, as it's written on the patch header.

Cheers!
Title: Re: Ask for permission to inquire about completeness
Post by: iherephone on January 16, 2021, 09:14:00 PM
If you want to apply the simplified patch without a config variable, you'll just need to insert 5 lines of code in PlayerInstance.java, as Mobius shared above.

Try this.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (revision 7949)
+++ java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java (working copy)
@@ -13426,6 +13426,11 @@
  }
  if (_fallingDamageTask != null)
  {
+ final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
+ if (getZ() < nearestZ)
+ {
+ teleToLocation(new Location(getX(), getY(), nearestZ));
+ }
  _fallingDamageTask.cancel(true);
  }
  _fallingDamageTask = ThreadPool.schedule(() ->

Please do extensive tests because this can cause many problems if it is not proper.
If it works, also test without geodata.

Yon can apply it as a patch (copy all the provided patch, right click project on Eclipse > Team > Apply Patch...) or manually in the case you have some customs that can interfere with the patch provided, but i doubt it will be the case  :)

For further understanding of what this patch does:

final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());

Store the nearest Z value of the world (Z is relative to Height).

if (getZ() < nearestZ)

Check if Player's Z position is below the nearest world Z position.

teleToLocation(new Location(getX(), getY(), nearestZ));

Teleports the Player to the same X and Y coordinates, but replaces his Z position with the nearest world Z value, so it gets bumped to the surface.

If you are new to Java (or new to OOP in general), you should try to analyze code this way, line by line and step by step. Also, try to learn the project structure, so it will be easier to understand how thing works and making further changes. You can find PlayerInstance.java inside java/org/l2jmobius/gameserver/model/actor/instance for example, as it's written on the patch header.

Cheers!


Thanks for the further explanation.