L2JMobius

High Five Ask for permission to inquire about completeness

iherephone · 13 · 3804

Offline iherephone

  • Vassal
  • *
    • Posts: 7
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 *


Online G-hamsteR

  • Viscount
  • *****
    • Posts: 328
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.


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16011
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.


Offline iherephone

  • Vassal
  • *
    • Posts: 7
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


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16011


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16011
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.


Offline iherephone

  • Vassal
  • *
    • Posts: 7
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?


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16011
Copy patch in clipboard (ctrl+c).
Right click on project.
Team.
Apply patch.



Offline iherephone

  • Vassal
  • *
    • Posts: 7
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.



Offline Helionar

  • Heir
  • **
    • Posts: 38
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!


Offline iherephone

  • Vassal
  • *
    • Posts: 7
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.