3596 {
3597 #ifdef SERVER
3598 return null;
3599 #endif
3601 DayZPlayerTypeVoiceSoundLookupTable table = type.GetVoiceSoundLookupTable();
3602 if (!table)
3603 return null;
3605 EntityAI mask = GetInventory().FindAttachment(InventorySlots.MASK);
3606 EntityAI head_gear = GetInventory().FindAttachment(InventorySlots.HEADGEAR);
3607
3608 string category;
3609 if (mask || head_gear)
3610 {
3611 string category_mask;
3612 string category_headgear;
3613
3614 int priority_mask;
3615 int priority_headgear;
3616
3617 if (mask)
3618 {
3619 category_mask = mask.ConfigGetString("soundVoiceType");
3620 priority_mask = mask.ConfigGetInt("soundVoicePriority");
3621 }
3622 if (head_gear)
3623 {
3624 category_headgear = head_gear.ConfigGetString("soundVoiceType");
3625 priority_headgear = head_gear.ConfigGetInt("soundVoicePriority");
3626 }
3627
3628 if (priority_headgear >= priority_mask && category_headgear != "")
3629 {
3630 category = category_headgear;
3631 }
3632 else
3633 {
3634 category = category_mask;
3635 }
3636 }
3637
3638 if (category == "")
3639 {
3640 category = "none";
3641 }
3642
3644
3645 if (soundBuilder)
3646 {
3647 PlayerBase player = PlayerBase.Cast(this);
3648
3649 int maleVoiceType = 0;
3650 int femaleVoiceType = 0;
3651 if (player.IsMale())
3652 {
3653 maleVoiceType = player.GetVoiceType();
3654 }
3655 else
3656 {
3657 femaleVoiceType = player.GetVoiceType();
3658 }
3659
3660 soundBuilder.AddVariable("male", maleVoiceType);
3661 soundBuilder.AddVariable("female", femaleVoiceType);
3662
3663
3664 SoundObject soundObject = soundBuilder.BuildSoundObject();
3665 if (soundObject != NULL)
3666 {
3668 wave =
PlaySound(soundObject, soundBuilder);
3669 }
3670
3671 }
3672
3673 return wave;
3674 }
void AttenuateSoundIfNecessary(SoundObject soundObject)
override SoundObjectBuilder GetSoundBuilder(int eventId, int parameterHash)
proto native DayZPlayerType GetDayZPlayerType()
returns appropriate DayZPlayerType
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
void SoundObject(SoundParams soundParams)
proto native int Hash()
Returns hash of string.