diff --git a/HarmonySrc/BundleShaderFix.cs b/HarmonySrc/BundleShaderFix.cs index 466bc37..cdfa96d 100644 --- a/HarmonySrc/BundleShaderFix.cs +++ b/HarmonySrc/BundleShaderFix.cs @@ -17,6 +17,13 @@ namespace NecromancerTome static Shader _std; static readonly HashSet _done = new HashSet(); + /// Выход из мира: бандлы при следующей загрузке дадут новые материалы - старые номера не нужны + /// (вызывает RemainsDecay, когда мира нет). + public static void Forget() + { + _done.Clear(); + } + public static void Fix(Transform _root) { if (_root == null) diff --git a/HarmonySrc/RemainsDecay.cs b/HarmonySrc/RemainsDecay.cs index d107f7c..a3ac670 100644 --- a/HarmonySrc/RemainsDecay.cs +++ b/HarmonySrc/RemainsDecay.cs @@ -40,6 +40,7 @@ namespace NecromancerTome if (world == null) { _since.Clear(); + BundleShaderFix.Forget(); return; } if (Time.time < _next || !SingletonMonoBehaviour.Instance.IsServer) diff --git a/NecromancerHarmony.dll b/NecromancerHarmony.dll index c5a3abb..2a6a242 100644 Binary files a/NecromancerHarmony.dll and b/NecromancerHarmony.dll differ diff --git a/NecromancerHarmony.pdb b/NecromancerHarmony.pdb index c70f0d3..ee400ae 100644 Binary files a/NecromancerHarmony.pdb and b/NecromancerHarmony.pdb differ