From 04b356120a93127a5cff2ee5933ff71c409f7c7d Mon Sep 17 00:00:00 2001 From: elusivecake <127344195+elusivecake@users.noreply.github.com> Date: Sun, 24 Nov 2024 15:44:21 +0200 Subject: [PATCH] [AI/HS2] Reapply the body alpha mask texture after loading new body (#290) This change addresses an issue specific to AI and HS2 in which loading an uncensor led to the body alpha mask texture getting lost in the process; the change simply reapplies the texture in question before the updateAlphaMask flag is set to true. This was already in place for KK, EC and KKS. ChaShader.AlphaMask in AI and HS2 is the equivalent to ChaShader._AlphaMask in KK, EC and KKS. --- src/UncensorSelector.Core/Core.UncensorSelector.Controller.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/UncensorSelector.Core/Core.UncensorSelector.Controller.cs b/src/UncensorSelector.Core/Core.UncensorSelector.Controller.cs index 63c6af5b..25c95925 100644 --- a/src/UncensorSelector.Core/Core.UncensorSelector.Controller.cs +++ b/src/UncensorSelector.Core/Core.UncensorSelector.Controller.cs @@ -397,6 +397,8 @@ private IEnumerator ReloadCharacterUncensor() #if KK || EC || KKS ChaControl.customMatBody.SetTexture(ChaShader._AlphaMask, ChaControl.texBodyAlphaMask); +#elif AI || HS2 + ChaControl.customMatBody.SetTexture(ChaShader.AlphaMask, ChaControl.texBodyAlphaMask); #endif ChaControl.updateAlphaMask = true; }