diff --git a/QSB/EchoesOfTheEye/Ghosts/Messages/FaceLocalDirectionMessage.cs b/QSB/EchoesOfTheEye/Ghosts/Messages/FaceLocalDirectionMessage.cs deleted file mode 100644 index 72eec1c1..00000000 --- a/QSB/EchoesOfTheEye/Ghosts/Messages/FaceLocalDirectionMessage.cs +++ /dev/null @@ -1,22 +0,0 @@ -using QSB.EchoesOfTheEye.Ghosts.WorldObjects; -using QSB.Messaging; -using QSB.Utility; -using UnityEngine; - -namespace QSB.EchoesOfTheEye.Ghosts.Messages; - -internal class FaceLocalDirectionMessage : QSBWorldObjectMessage -{ - public FaceLocalDirectionMessage(Vector3 localDirection, float degreesPerSecond, float turnAcceleration) : base((localDirection, degreesPerSecond, turnAcceleration)) { } - - public override void OnReceiveRemote() - { - if (QSBCore.IsHost) - { - DebugLog.ToConsole("Error - Received FaceLocalDirectionMessage on host. Something has gone horribly wrong!", OWML.Common.MessageType.Error); - return; - } - - WorldObject.FaceLocalDirection(Data.localDirection, Data.degreesPerSecond, Data.turnAcceleration, true); - } -} diff --git a/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostController.cs b/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostController.cs index 228ad983..311376f8 100644 --- a/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostController.cs +++ b/QSB/EchoesOfTheEye/Ghosts/WorldObjects/QSBGhostController.cs @@ -222,26 +222,6 @@ public class QSBGhostController : WorldObject, IGhostObject AttachedObject.FaceNode(node, turnSpeed, nodeDelay, autoFocusLantern); } - public void FaceLocalDirection(Vector3 localDirection, TurnSpeed turnSpeed) - { - FaceLocalDirection(localDirection, GhostConstants.GetTurnSpeed(turnSpeed), GhostConstants.GetTurnAcceleration(turnSpeed)); - } - - public void FaceLocalDirection(Vector3 localDirection, float degreesPerSecond, float turnAcceleration = 360f, bool remote = false) - { - if (!remote) - { - if (!QSBCore.IsHost) - { - return; - } - - this.SendMessage(new FaceLocalDirectionMessage(localDirection, degreesPerSecond, turnAcceleration)); - } - - AttachedObject.FaceLocalDirection(localDirection, degreesPerSecond, turnAcceleration); - } - public void StopMoving() { if (!QSBCore.IsHost)