Minor fixes

This commit is contained in:
SDraw 2023-11-27 11:45:01 +03:00
parent aebf6c2c4e
commit 914bca26e4
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
14 changed files with 226 additions and 54 deletions

View file

@ -56,6 +56,8 @@ namespace ml_amt
if(ms_instance == this)
ms_instance = null;
if(m_localTweaker != null)
UnityEngine.Object.Destroy(m_localTweaker);
m_localTweaker = null;
}

View file

@ -74,6 +74,10 @@ namespace ml_amt
void OnDestroy()
{
m_vrIk = null;
m_ikLimits = null;
m_parameters.Clear();
Settings.CrouchLimitChange -= this.SetCrouchLimit;
Settings.ProneLimitChange -= this.SetProneLimit;
Settings.IKOverrideFlyChange -= this.SetIKOverrideFly;