1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +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() IEnumerable<Texture> getTextures()
{ {
ISkin lookupSource = null;
for (int i = 0; true; i++) for (int i = 0; true; i++)
{ {
string frameName = $"{componentName}{animationSeparator}{i}"; if ((texture = source.GetTexture($"{componentName}{animationSeparator}{i}", wrapModeS, wrapModeT)) == null)
// 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)
break; break;
yield return texture; yield return texture;