mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 19:39:21 +00:00
Ignoring local player's pointers option
Settings hide
This commit is contained in:
parent
fa5a0334b9
commit
f983f2909c
3 changed files with 28 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
using ABI.CCK.Components;
|
||||
using ABI_RC.Core.Player;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ml_prm
|
||||
|
@ -32,7 +33,7 @@ namespace ml_prm
|
|||
void OnTriggerEnter(Collider p_other)
|
||||
{
|
||||
CVRPointer l_pointer = p_other.GetComponent<CVRPointer>();
|
||||
if((l_pointer != null) && (l_pointer.type == "ragdoll") && (m_lastTrigger != p_other))
|
||||
if((l_pointer != null) && (l_pointer.type == "ragdoll") && !IsIgnored(l_pointer.transform) && (m_lastTrigger != p_other))
|
||||
{
|
||||
m_lastTrigger = p_other;
|
||||
m_triggered = true;
|
||||
|
@ -51,5 +52,10 @@ namespace ml_prm
|
|||
m_triggered = false;
|
||||
return l_state;
|
||||
}
|
||||
|
||||
static bool IsIgnored(Transform p_transform)
|
||||
{
|
||||
return (Settings.IgnoreLocal && (p_transform.root == PlayerSetup.Instance.transform));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue