3530 {
3531 #ifdef SERVER
3532 return null;
3533 #endif
3535 DayZPlayerTypeVoiceSoundLookupTable table = type.GetVoiceSoundLookupTable();
3536 if (!table)
3537 return null;
3539 EntityAI mask = GetInventory().FindAttachment(InventorySlots.MASK);
3540 EntityAI head_gear = GetInventory().FindAttachment(InventorySlots.HEADGEAR);
3541
3542 string category;
3543 if (mask || head_gear)
3544 {
3545 string category_mask;
3546 string category_headgear;
3547
3548 int priority_mask;
3549 int priority_headgear;
3550
3551 if (mask)
3552 {
3553 category_mask = mask.ConfigGetString("soundVoiceType");
3554 priority_mask = mask.ConfigGetInt("soundVoicePriority");
3555 }
3556 if (head_gear)
3557 {
3558 category_headgear = head_gear.ConfigGetString("soundVoiceType");
3559 priority_headgear = head_gear.ConfigGetInt("soundVoicePriority");
3560 }
3561
3562 if (priority_headgear >= priority_mask && category_headgear != "")
3563 {
3564 category = category_headgear;
3565 }
3566 else
3567 {
3568 category = category_mask;
3569 }
3570 }
3571
3572 if (category == "")
3573 {
3574 category = "none";
3575 }
3576
3578
3579 if (soundBuilder)
3580 {
3581 PlayerBase player = PlayerBase.Cast(this);
3582
3583 int maleVoiceType = 0;
3584 int femaleVoiceType = 0;
3585 if (player.IsMale())
3586 {
3587 maleVoiceType = player.GetVoiceType();
3588 }
3589 else
3590 {
3591 femaleVoiceType = player.GetVoiceType();
3592 }
3593
3594 soundBuilder.AddVariable("male", maleVoiceType);
3595 soundBuilder.AddVariable("female", femaleVoiceType);
3596
3597
3598 SoundObject soundObject = soundBuilder.BuildSoundObject();
3599 if (soundObject != NULL)
3600 {
3602 wave =
PlaySound(soundObject, soundBuilder);
3603 }
3604
3605 }
3606
3607 return wave;
3608 }
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.