mirror of
https://github.com/osukey/osukey.git
synced 2025-05-08 07:07:18 +09:00
Account angle change negatively on rewind
This commit is contained in:
parent
3d8b27abfa
commit
f5f2713a17
@ -85,8 +85,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
public float BidirectionalRotation;
|
public float BidirectionalRotation;
|
||||||
private int completeTick;
|
private int completeTick;
|
||||||
|
|
||||||
|
private double lastTime;
|
||||||
|
|
||||||
private bool updateCompleteTick() => completeTick != (completeTick = (int)(BidirectionalRotation / 360));
|
private bool updateCompleteTick() => completeTick != (completeTick = (int)(BidirectionalRotation / 360));
|
||||||
|
|
||||||
private bool rotationTransferred;
|
private bool rotationTransferred;
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
@ -112,6 +114,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
|
|
||||||
currentRotation += thisAngle - lastAngle;
|
currentRotation += thisAngle - lastAngle;
|
||||||
BidirectionalRotation += Math.Abs(thisAngle - lastAngle) * Math.Sign(Time.Current - lastTime);
|
BidirectionalRotation += Math.Abs(thisAngle - lastAngle) * Math.Sign(Time.Current - lastTime);
|
||||||
|
lastTime = Time.Current;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastAngle = thisAngle;
|
lastAngle = thisAngle;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user