diff --git a/Assets/GameObjects/Prefabs/Player.prefab b/Assets/GameObjects/Prefabs/Player.prefab index 17bbf53..002062a 100644 --- a/Assets/GameObjects/Prefabs/Player.prefab +++ b/Assets/GameObjects/Prefabs/Player.prefab @@ -257,133 +257,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: Speed: 10 ---- !u!1 &5718736892961115305 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 909379341251156422} - - component: {fileID: 9108451331173124187} - m_Layer: 0 - m_Name: LocalHitSfx - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &909379341251156422 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5718736892961115305} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.75, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 7391558912774766616} - m_RootOrder: 6 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!82 &9108451331173124187 -AudioSource: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5718736892961115305} - m_Enabled: 1 - serializedVersion: 4 - OutputAudioMixerGroup: {fileID: 6277318630853483794, guid: ff7bf5284859d9f45a64971a67bb173a, type: 2} - m_audioClip: {fileID: 8300000, guid: e0e4bdf456a98d245a95bfcf948dc377, type: 3} - m_PlayOnAwake: 0 - m_Volume: 1 - m_Pitch: 1 - Loop: 0 - Mute: 0 - Spatialize: 0 - SpatializePostEffects: 0 - Priority: 128 - DopplerLevel: 1 - MinDistance: 1 - MaxDistance: 500 - Pan2D: 0 - rolloffMode: 0 - BypassEffects: 0 - BypassListenerEffects: 0 - BypassReverbZones: 0 - rolloffCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - panLevelCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - spreadCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - reverbZoneMixCustomCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 --- !u!1 &6951373490603822597 GameObject: m_ObjectHideFlags: 0 @@ -427,14 +300,14 @@ AudioSource: OutputAudioMixerGroup: {fileID: -1410552352759146441, guid: ff7bf5284859d9f45a64971a67bb173a, type: 2} m_audioClip: {fileID: 0} m_PlayOnAwake: 0 - m_Volume: 1 + m_Volume: 0.5 m_Pitch: 1 Loop: 0 Mute: 0 Spatialize: 0 SpatializePostEffects: 0 Priority: 128 - DopplerLevel: 1 + DopplerLevel: 0 MinDistance: 1 MaxDistance: 1000 Pan2D: 0 @@ -846,7 +719,6 @@ Transform: - {fileID: 7391558912167870012} - {fileID: 4833458671639168932} - {fileID: 5158433773336955785} - - {fileID: 909379341251156422} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -922,7 +794,7 @@ MonoBehaviour: GunShotAudioSource: {fileID: 3686721060470342146} RaygunClip: {fileID: 8300000, guid: 39b92d54fd06ad1419e7fb833ec9d43a, type: 3} HitAudioSource: {fileID: 8513157977701802929} - LocalHitAudioSource: {fileID: 9108451331173124187} + LocalHitAudioSource: {fileID: 8513157977701802929} Pitch: 0 Yaw: 0 BodyYaw: 0 @@ -1224,7 +1096,7 @@ AudioSource: Spatialize: 0 SpatializePostEffects: 0 Priority: 128 - DopplerLevel: 1 + DopplerLevel: 0 MinDistance: 1 MaxDistance: 500 Pan2D: 0 diff --git a/Assets/Scripts/Players/Player.cs b/Assets/Scripts/Players/Player.cs index bb1d985..b8f72f1 100644 --- a/Assets/Scripts/Players/Player.cs +++ b/Assets/Scripts/Players/Player.cs @@ -207,7 +207,9 @@ namespace NeonTea.Quakeball.Players { Debug.Log("I was hit! Aaagh!"); Splatter.Play(); HitAudioSource.Play(); - LocalHitAudioSource.Play(); + if (IsLocal) { + Net.Singleton.Instance.LocalPlayer.Controlled.LocalHitAudioSource.Play(); + } } public bool IsGrounded() {