mirror of
https://github.com/SDraw/ml_mods_cvr.git
synced 2026-05-05 01:27:00 +00:00
Impact sounds
This commit is contained in:
parent
15de34c0bd
commit
2a06001100
23 changed files with 401 additions and 96 deletions
|
|
@ -100,6 +100,15 @@ namespace ml_prm
|
|||
Detach();
|
||||
}
|
||||
|
||||
void OnCollisionEnter(Collision p_col)
|
||||
{
|
||||
if(Settings.ImpactSounds && m_ready && !m_rigidBody.isKinematic && (p_col.gameObject.layer != CVRLayers.PlayerClone))
|
||||
{
|
||||
if(p_col.impulse.magnitude > 5f)
|
||||
SoundManager.Instance.PlaySound(SoundManager.ImpactType.Soft);
|
||||
}
|
||||
}
|
||||
|
||||
void OnContactEnter(ContactCollisionInfo p_col)
|
||||
{
|
||||
if(m_ready && (RagdollController.Instance != null) && ContactManager.Exists)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue