Pointer state checks

This commit is contained in:
SDraw 2024-07-23 21:46:48 +03:00
parent 075ff67304
commit bcbb07c172
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5

View file

@ -90,7 +90,7 @@ namespace ml_prm
if(Settings.PointersReaction && (RagdollController.Instance != null)) if(Settings.PointersReaction && (RagdollController.Instance != null))
{ {
CVRPointer l_pointer = p_col.GetComponent<CVRPointer>(); CVRPointer l_pointer = p_col.GetComponent<CVRPointer>();
if((l_pointer != null) && (l_pointer.type == c_ragdollPointerType) && !IsIgnored(l_pointer.transform) && !RagdollController.Instance.IsRagdolled()) if((l_pointer != null) && (l_pointer.type == c_ragdollPointerType) && l_pointer.enabled && !IsIgnored(l_pointer.transform) && !RagdollController.Instance.IsRagdolled())
RagdollController.Instance.SwitchRagdoll(); RagdollController.Instance.SwitchRagdoll();
} }
} }
@ -183,7 +183,7 @@ namespace ml_prm
{ {
if(Settings.PointersReaction && (RagdollController.Instance != null)) if(Settings.PointersReaction && (RagdollController.Instance != null))
{ {
if((pointer != null) && (pointer.type == c_ragdollPointerType) && !IsIgnored(pointer.transform) && !RagdollController.Instance.IsRagdolled()) if((pointer != null) && (pointer.type == c_ragdollPointerType) && pointer.enabled && !IsIgnored(pointer.transform) && !RagdollController.Instance.IsRagdolled())
RagdollController.Instance.SwitchRagdoll(); RagdollController.Instance.SwitchRagdoll();
} }
} }