Minor code improvements

This commit is contained in:
SDraw 2024-09-25 01:52:36 +03:00
parent a2f9c1303e
commit 45557943c4
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
35 changed files with 557 additions and 835 deletions

View file

@ -64,6 +64,8 @@ namespace ml_prm
m_rigidBody.mass = mass;
m_physicsInfluencer.volume = mass * 0.005f;
m_physicsInfluencer.enableLocalGravity = true;
this.gameObject.name = string.Format("{0} [NoGizmo]", this.gameObject.name);
}
if(collider != null)
@ -109,11 +111,11 @@ namespace ml_prm
void OnTriggerEnter(Collider p_col)
{
if(Settings.PointersReaction && (RagdollController.Instance != null))
if(Settings.PointersReaction && (RagdollController.Instance != null) && !RagdollController.Instance.IsRagdolled())
{
CVRPointer l_pointer = p_col.GetComponent<CVRPointer>();
if((l_pointer != null) && (l_pointer.type == c_ragdollPointerType) && l_pointer.enabled && !IsIgnored(l_pointer.transform) && !RagdollController.Instance.IsRagdolled())
RagdollController.Instance.SwitchRagdoll();
if((l_pointer != null) && (l_pointer.type == c_ragdollPointerType) && l_pointer.enabled && !IsIgnored(l_pointer.transform))
RagdollController.Instance.Ragdoll();
}
}