File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ public class PlayerDeath : MonoBehaviour
28
28
29
29
const float fallSpeed = 2.5f ;
30
30
31
+ public const SoundClips classicPlayerDeathSound = SoundClips . WoodElfMalePain1 ;
31
32
public float FadeDuration = 2f ;
32
33
public float TimeBeforeReset = 3 ;
33
34
@@ -160,9 +161,13 @@ private void PlayerEntity_OnDeath(DaggerfallEntity entity)
160
161
currentCameraHeight = startCameraHeight ;
161
162
DaggerfallUI . Instance . FadeBehaviour . FadeHUDToBlack ( FadeDuration ) ;
162
163
163
- // There are 3 pain-like sounds for each race/gender. The third one, used here, sounds like
164
- // it may have been meant for when the player dies.
165
- SoundClips sound = GetRaceGenderPain3Sound ( playerEntity . Race , playerEntity . Gender ) ;
164
+ SoundClips sound = classicPlayerDeathSound ;
165
+ if ( DaggerfallUnity . Settings . CombatVoices )
166
+ {
167
+ // There are 3 pain-like sounds for each race/gender. The third one, used here, sounds like
168
+ // it may have been meant for when the player dies.
169
+ sound = GetRaceGenderPain3Sound ( playerEntity . Race , playerEntity . Gender ) ;
170
+ }
166
171
167
172
if ( DaggerfallUI . Instance . DaggerfallAudioSource )
168
173
DaggerfallUI . Instance . DaggerfallAudioSource . PlayOneShot ( sound , 0 ) ;
You can’t perform that action at this time.
0 commit comments