From e6210003ff9d2d0be69ca070dafb0c05f9b36cfa Mon Sep 17 00:00:00 2001 From: NickAc <32451103+NickAcPT@users.noreply.github.com> Date: Sun, 3 Nov 2024 16:03:28 +0000 Subject: [PATCH] Process Ears features from skin even when loading from cache --- nmsr-aas/src/model/resolver/mod.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/nmsr-aas/src/model/resolver/mod.rs b/nmsr-aas/src/model/resolver/mod.rs index 88921e7..49134f3 100644 --- a/nmsr-aas/src/model/resolver/mod.rs +++ b/nmsr-aas/src/model/resolver/mod.rs @@ -258,7 +258,16 @@ impl RenderRequestResolver { &self, entry: &RenderRequestEntry, ) -> Result { - if let Some(result) = self.model_cache.get_cached_resolved_texture(entry).await? { + #[cfg_attr(not(feature = "ears"), allow(unused_mut))] + if let Some(mut result) = self.model_cache.get_cached_resolved_texture(entry).await? { + #[cfg(feature = "ears")] + if let Some(skin) = result.textures.remove(&ResolvedRenderEntryTextureType::Skin) { + Self::resolve_ears_textures(&skin, &mut result.textures); + result.textures.insert(ResolvedRenderEntryTextureType::Skin, skin); + + return Ok(result); + } + return Ok(result); }