Skip to content

Commit

Permalink
Fix teleportation when IScriptPlayer.setRotations()
Browse files Browse the repository at this point in the history
  • Loading branch information
mchorse committed Nov 18, 2021
1 parent d127ea4 commit d51fbb6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import mchorse.mappet.network.Dispatcher;
import mchorse.mappet.network.common.huds.PacketHUDMorph;
import mchorse.mappet.network.common.huds.PacketHUDScene;
import mchorse.mappet.network.common.scripts.PacketEntityRotations;
import mchorse.mappet.network.common.scripts.PacketSound;
import mchorse.mappet.network.common.ui.PacketCloseUI;
import mchorse.mappet.network.common.ui.PacketUI;
Expand Down Expand Up @@ -70,7 +71,7 @@ public void setRotations(float pitch, float yaw, float yawHead)
{
super.setRotations(pitch, yaw, yawHead);

this.entity.connection.setPlayerLocation(this.entity.posX, this.entity.posY, this.entity.posZ, yaw, pitch);
Dispatcher.sendTo(new PacketEntityRotations(this.entity.getEntityId(), yaw, yawHead, pitch), this.entity);
}

@Override
Expand Down

0 comments on commit d51fbb6

Please sign in to comment.