DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnSoundEvent()

void DayZPlayer::OnSoundEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected

См. определение в файле DayZPlayerImplement.c строка 3484

3485 {
3486 int eventReplaceID = 0;
3487
3488 if (pEventType == "Sound")
3489 {
3490 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT || GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_REMOTE)
3491 {
3492 eventReplaceID = m_ReplaceSoundEventHandler.GetSoundEventID(pUserInt, ESoundEventType.SOUND_COMMON);
3493 if (eventReplaceID > 0 && PlaySoundEventType(ESoundEventType.SOUND_COMMON, eventReplaceID))
3494 return; //return only when 'PlaySoundEventType' successful
3495 }
3496
3497 ProcessSoundEvent(pEventType, pUserString, pUserInt);
3498 }
3499 else if (pEventType == "SoundWeapon")
3500 {
3501 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT || GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_REMOTE)
3502 {
3503 eventReplaceID = m_ReplaceSoundEventHandler.GetSoundEventID(pUserInt, ESoundEventType.SOUND_WEAPON);
3504 if (eventReplaceID > 0 && PlaySoundEventType(ESoundEventType.SOUND_WEAPON, eventReplaceID))
3505 return; //return only when 'PlaySoundEventType' successful
3506 }
3507
3508 ProcessWeaponEvent(pEventType, pUserString, pUserInt);
3509 }
3510 else if (pEventType == "SoundAttachment")
3511 {
3512 ProcessAttachmentEvent(pEventType, pUserString, pUserInt);
3513 }
3514 else if (pEventType == "SoundVoice")
3515 {
3516 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT || GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_REMOTE)
3517 {
3519 eventReplaceID = m_ReplaceSoundEventHandler.GetSoundEventID(pUserInt, ESoundEventType.SOUND_VOICE); //check if some animation override registered
3520
3521 if (eventReplaceID > 0 && PlaySoundEventType(ESoundEventType.SOUND_VOICE, eventReplaceID))
3522 {
3523 return; //return only when 'PlaySoundEventType' successful
3524 }
3525 else
3526 {
3527 //made this a secondary override, since there is some weirdness in sharing sound event IDs between unrelated animations (eating X forcefeeding etc.) and redundant translations (888 -> 888)
3528 int eventID = m_PlayerSoundEventHandler.ConvertAnimIDtoEventID(pUserInt);
3529 if (eventID > 0)
3530 {
3531 PlaySoundEvent(eventID);
3532 return;
3533 }
3534 }
3535 }
3536
3537 ProcessVoiceEvent(pEventType, pUserString, pUserInt);
3538 }
3539 else
3540 {
3541 Debug.Log("OnSoundEvent: Unknown sound event \"" + pEventType + "\"");
3542 }
3543 }
string Debug()
Определения CachedEquipmentStorageBase.c:26
ESoundEventType
Определения ReplaceSoundEventHandler.c:2
void ProcessSoundEvent(string pEventType, string pUserString, int pUserInt)
Определения DayZPlayerImplement.c:3674
ref PlayerSoundEventHandler m_PlayerSoundEventHandler
Определения DayZPlayerImplement.c:100
AbstractWave ProcessVoiceEvent(string pEventType, string pUserString, int pUserInt)
Определения DayZPlayerImplement.c:3716
void ProcessAttachmentEvent(string pEventType, string pUserString, int pUserInt)
Определения DayZPlayerImplement.c:3608
bool PlaySoundEvent(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false)
Определения DayZPlayerImplement.c:485
bool PlaySoundEventType(ESoundEventType soundType, int soundEventID, int param=0)
Handle sound event by respective sound handler based on its type.
Определения DayZPlayerImplement.c:484
void ProcessWeaponEvent(string pEventType, string pUserString, int pUserInt)
Определения DayZPlayerImplement.c:3551
ref ReplaceSoundEventHandler m_ReplaceSoundEventHandler
Определения DayZPlayerImplement.c:101
DayZPlayerInstanceType
defined in C++
Определения dayzplayer.c:1084
proto native DayZPlayerInstanceType GetInstanceType()

Перекрестные ссылки GetInstanceType(), Debug::Log(), m_PlayerSoundEventHandler, m_ReplaceSoundEventHandler, PlaySoundEvent(), PlaySoundEventType(), ProcessAttachmentEvent(), ProcessSoundEvent(), ProcessVoiceEvent() и ProcessWeaponEvent().