mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-03-28 16:20:38 +00:00
remove facelocaldirectionmessage
This commit is contained in:
parent
c9de638a93
commit
bc7a7211b9
@ -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);
|
||||
}
|
||||
}
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user