remove facelocaldirectionmessage

This commit is contained in:
Mister_Nebula 2022-08-21 00:43:07 +01:00
parent c9de638a93
commit bc7a7211b9
2 changed files with 0 additions and 42 deletions

View File

@ -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<QSBGhostController, (Vector3 localDirection, float degreesPerSecond, float turnAcceleration)>
{
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);
}
}

View File

@ -222,26 +222,6 @@ public class QSBGhostController : WorldObject<GhostController>, 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)