mirror of
https://github.com/ppy/osu.git
synced 2026-06-04 18:24:13 +08:00
Avoid unnecessary texture retrieval for non-animated sprites
This commit is contained in:
@@ -142,9 +142,9 @@ namespace osu.Game.Skinning
|
||||
};
|
||||
}
|
||||
|
||||
var texture = GetTexture($"{componentName}-0");
|
||||
Texture texture;
|
||||
|
||||
if (texture != null && animatable)
|
||||
if (animatable && (texture = GetTexture($"{componentName}-0")) != null)
|
||||
{
|
||||
var animation = new TextureAnimation { DefaultFrameLength = default_frame_time };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user