Set the frame time appropriately to reverse judgements a little better

This commit is contained in:
smoogipoo 2017-11-10 22:11:25 +09:00
parent 49731f4c05
commit 5277c3c164
1 changed files with 6 additions and 0 deletions

View File

@ -104,7 +104,13 @@ protected Vector2? Position
{
//if we changed frames, we want to execute once *exactly* on the frame's time.
if (currentDirection == time.CompareTo(NextFrame.Time) && advanceFrame())
{
// If going backwards, we need to execute once _before_ the frame time to reverse any judgements
// that would occur as a result of this frame in forward playback
if (currentDirection == -1)
return currentTime = CurrentFrame.Time - 1;
return currentTime = CurrentFrame.Time;
}
//if we didn't change frames, we need to ensure we are allowed to run frames in between, else return null.
if (inImportantSection)