Merge pull request #1747 from Azaezel/alpha41/reverseLoop
Some checks failed
Linux Build / Ubuntu Latest GCC (push) Has been cancelled
MacOSX Build / MacOSX Latest Clang (push) Has been cancelled
Windows Build / Windows Latest MSVC (push) Has been cancelled

properly handle looping shapes moving backwards
This commit is contained in:
Brian Roberts 2026-05-20 18:38:46 -05:00 committed by GitHub
commit 3661499b33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -229,7 +229,9 @@ void PathShape::advancePosition(S32 ms)
}
// Script callbacks
if (int(mPosition) != int(delta.timeVec))
if ((mState == Backward) && (int(mPosition) == 0) && (mSpline.advanceTime(delta.timeVec - mNodeBase, -ms) < TickSec))
onNode(0);
else if (int(mPosition)>0 && int(mPosition) != int(delta.timeVec))
onNode(int(mPosition));
// Set frame interpolation