1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 23:27:25 +08:00

Revert "Ensure all frames in an animation are retrieved from the same skin"

This reverts commit 37c8c63fc5.
This commit is contained in:
Dean Herbert 2021-06-06 12:37:42 +09:00
parent b87a5956dd
commit b904fa6615

View File

@ -54,16 +54,9 @@ namespace osu.Game.Skinning
IEnumerable<Texture> getTextures()
{
ISkin lookupSource = null;
for (int i = 0; true; i++)
{
string frameName = $"{componentName}{animationSeparator}{i}";
// ensure all textures are retrieved from the same skin source.
lookupSource ??= source.FindProvider(s => s.GetTexture(frameName, wrapModeS, wrapModeT) != null);
if ((texture = lookupSource?.GetTexture(frameName, wrapModeS, wrapModeT)) == null)
if ((texture = source.GetTexture($"{componentName}{animationSeparator}{i}", wrapModeS, wrapModeT)) == null)
break;
yield return texture;