Fix MouseRotator on rotated grids (#29663)

* fix harm mode rotation

* cleanup

* -pi to pi
This commit is contained in:
slarticodefast
2024-07-02 15:04:15 +02:00
committed by GitHub
parent 763a25e934
commit daae8253c6
3 changed files with 12 additions and 33 deletions

View File

@@ -30,8 +30,7 @@ public sealed partial class MouseRotatorComponent : Component
public double RotationSpeed = float.MaxValue;
/// <summary>
/// This one is important. If this is true, <see cref="AngleTolerance"/> does not apply, and the system will
/// use <see cref="RequestMouseRotatorRotationSimpleEvent"/> instead. In this mode, the client will only send
/// This one is important. If this is true, <see cref="AngleTolerance"/> does not apply. In this mode, the client will only send
/// events when an entity should snap to a different cardinal direction, rather than for every angle change.
///
/// This is useful for cases like humans, where what really matters is the visual sprite direction, as opposed to something
@@ -50,13 +49,3 @@ public sealed class RequestMouseRotatorRotationEvent : EntityEventArgs
{
public Angle Rotation;
}
/// <summary>
/// Simpler version of <see cref="RequestMouseRotatorRotationEvent"/> for implementations
/// that only require snapping to 4-dir and not full angle rotation.
/// </summary>
[Serializable, NetSerializable]
public sealed class RequestMouseRotatorRotationSimpleEvent : EntityEventArgs
{
public Direction Direction;
}