Skip to content

Commit

Permalink
Fix mistake while adding cannon physics at last minute
Browse files Browse the repository at this point in the history
  • Loading branch information
Samsuik committed Dec 14, 2023
1 parent 63cc76f commit 493ee9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions patches/server/0020-Optimised-Explosions.patch
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ index 0000000000000000000000000000000000000000..3f6f34cc617efaad420485a7f613cfca
+}
diff --git a/src/main/java/me/samsuik/sakura/explosion/SakuraExplosion.java b/src/main/java/me/samsuik/sakura/explosion/SakuraExplosion.java
new file mode 100644
index 0000000000000000000000000000000000000000..8a8b4169c8928459f6b51150bd8e67d0a309ca08
index 0000000000000000000000000000000000000000..b87748ae90863abe8f85dcbdc5a202cb3c9e2037
--- /dev/null
+++ b/src/main/java/me/samsuik/sakura/explosion/SakuraExplosion.java
@@ -0,0 +1,403 @@
Expand Down Expand Up @@ -311,7 +311,7 @@ index 0000000000000000000000000000000000000000..8a8b4169c8928459f6b51150bd8e67d0
+
+ // update explosion position
+ x = source.getX();
+ y = source.getY();
+ y = source.getY(0.0625D);
+ z = source.getZ();
+ }
+
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0040-Configure-cannon-physics-by-version.patch
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ index ae2eede559bd9fe7e500ce180f2ac102a95d3856..7ced5ae768cbea9ee0a7bab2365fbaef
if (xSmaller && z != 0.0) {
z = performAABBCollisionsZ(axisalignedbb, z, aabbs);
diff --git a/src/main/java/me/samsuik/sakura/explosion/SakuraExplosion.java b/src/main/java/me/samsuik/sakura/explosion/SakuraExplosion.java
index 8a8b4169c8928459f6b51150bd8e67d0a309ca08..a291516ec7bdb9d8b840f41ca52e6bbaf8e2e08a 100644
index b87748ae90863abe8f85dcbdc5a202cb3c9e2037..a291516ec7bdb9d8b840f41ca52e6bbaf8e2e08a 100644
--- a/src/main/java/me/samsuik/sakura/explosion/SakuraExplosion.java
+++ b/src/main/java/me/samsuik/sakura/explosion/SakuraExplosion.java
@@ -163,7 +163,7 @@ public class SakuraExplosion extends Explosion {

// update explosion position
x = source.getX();
- y = source.getY();
- y = source.getY(0.0625D);
+ y = physics.before(1_10_0) ? source.getY() + (double) 0.49f : source.getY(0.0625D);
z = source.getZ();
}
Expand Down

0 comments on commit 493ee9d

Please sign in to comment.