mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 10:52:55 +08: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;
|
||||
private int completeTick;
|
||||
|
||||
private double lastTime;
|
||||
|
||||
private bool updateCompleteTick() => completeTick != (completeTick = (int)(BidirectionalRotation / 360));
|
||||
|
||||
private bool rotationTransferred;
|
||||
|
||||
protected override void Update()
|
||||
@ -112,6 +114,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
|
||||
currentRotation += thisAngle - lastAngle;
|
||||
BidirectionalRotation += Math.Abs(thisAngle - lastAngle) * Math.Sign(Time.Current - lastTime);
|
||||
lastTime = Time.Current;
|
||||
}
|
||||
|
||||
lastAngle = thisAngle;
|
||||
|
Loading…
Reference in New Issue
Block a user