Fix player relative yaw when exiting portal (Fixes #4)
This commit is contained in:
parent
4c5ffed531
commit
654ddefb6e
@ -477,11 +477,9 @@ public class Portal {
|
|||||||
|
|
||||||
// Handle backwards gates
|
// Handle backwards gates
|
||||||
int adjust = 180;
|
int adjust = 180;
|
||||||
if (isBackwards() || origin.isBackwards())
|
if (isBackwards() != origin.isBackwards())
|
||||||
adjust = 0;
|
adjust = 0;
|
||||||
if (isBackwards() && origin.isBackwards())
|
exit.setYaw(traveller.getYaw() - origin.getRotation() + this.getRotation() + adjust);
|
||||||
adjust = 180;
|
|
||||||
exit.setYaw(origin.getRotation() - traveller.getYaw() + this.getRotation() + adjust);
|
|
||||||
|
|
||||||
// Call the StargatePortalEvent to allow plugins to change destination
|
// Call the StargatePortalEvent to allow plugins to change destination
|
||||||
if (!origin.equals(this)) {
|
if (!origin.equals(this)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user