1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 05:52:55 +08:00

Fix double-assignment.

This commit is contained in:
Dean Herbert 2017-03-18 22:23:53 +09:00
parent 87622f9349
commit 125936bad0

View File

@ -24,8 +24,7 @@ namespace osu.Game.Graphics.Cursor
{ {
if (state.Mouse.HasMainButtonPressed) if (state.Mouse.HasMainButtonPressed)
{ {
Vector2 offset = state.Mouse.Delta; Vector2 offset = state.Mouse.Position - state.Mouse.PositionMouseDown ?? state.Mouse.Delta;
offset = state.Mouse.Position - state.Mouse.PositionMouseDown ?? state.Mouse.Delta;
float degrees = (float)MathHelper.RadiansToDegrees(Math.Atan2(-offset.X, offset.Y)) + 24.3f; float degrees = (float)MathHelper.RadiansToDegrees(Math.Atan2(-offset.X, offset.Y)) + 24.3f;
// Always rotate in the direction of least distance // Always rotate in the direction of least distance