DIRECTOR: Re-add sprite copy before applying delta frames

This commit is contained in:
Scott Percival 2024-01-31 11:31:28 +08:00
parent eba4a86797
commit 9d7fc01ba0
No known key found for this signature in database

View File

@ -413,6 +413,13 @@ void Score::updateCurrentFrame() {
}
if (_curFrameNumber != nextFrameNumberToLoad) {
// Load the current sprite information into the _currentFrame data store.
// This is specifically because of delta updates; loading the next frame
// in the score applies delta changes to _currentFrame, and ideally we want
// those deltas to be applied over the top of whatever the current state is.
for (uint ch = 0; ch < _channels.size(); ch++)
*_currentFrame->_sprites[ch] = *_channels[ch]->_sprite;
// this copies in the frame data and updates _curFrameNumber
loadFrame(nextFrameNumberToLoad, true);
}