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

◆ OnSoundEvent()

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

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

3348 {
3349 int eventReplaceID = 0;
3350
3351 if (pEventType == "Sound")
3352 {
3353 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT || GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_REMOTE)
3354 {
3355 eventReplaceID = m_ReplaceSoundEventHandler.GetSoundEventID(pUserInt, ESoundEventType.SOUND_COMMON);
3356 if (eventReplaceID > 0 && PlaySoundEventType(ESoundEventType.SOUND_COMMON, eventReplaceID))
3357 return; //return only when 'PlaySoundEventType' successful
3358 }
3359
3360 ProcessSoundEvent(pEventType, pUserString, pUserInt);
3361 }
3362 else if (pEventType == "SoundWeapon")
3363 {
3364 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT || GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_REMOTE)
3365 {
3366 eventReplaceID = m_ReplaceSoundEventHandler.GetSoundEventID(pUserInt, ESoundEventType.SOUND_WEAPON);
3367 if (eventReplaceID > 0 && PlaySoundEventType(ESoundEventType.SOUND_WEAPON, eventReplaceID))
3368 return; //return only when 'PlaySoundEventType' successful
3369 }
3370
3371 ProcessWeaponEvent(pEventType, pUserString, pUserInt);
3372 }
3373 else if (pEventType == "SoundAttachment")
3374 {
3375 ProcessAttachmentEvent(pEventType, pUserString, pUserInt);
3376 }
3377 else if (pEventType == "SoundVoice")
3378 {
3379 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT || GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_REMOTE)
3380 {
3382 eventReplaceID = m_ReplaceSoundEventHandler.GetSoundEventID(pUserInt, ESoundEventType.SOUND_VOICE); //check if some animation override registered
3383
3384 if (eventReplaceID > 0 && PlaySoundEventType(ESoundEventType.SOUND_VOICE, eventReplaceID))
3385 {
3386 return; //return only when 'PlaySoundEventType' successful
3387 }
3388 else
3389 {
3390 //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)
3391 int eventID = m_PlayerSoundEventHandler.ConvertAnimIDtoEventID(pUserInt);
3392 if (eventID > 0)
3393 {
3394 PlaySoundEvent(eventID);
3395 return;
3396 }
3397 }
3398 }
3399
3400 ProcessVoiceEvent(pEventType, pUserString, pUserInt);
3401 }
3402 else
3403 {
3404 Debug.Log("OnSoundEvent: Unknown sound event \"" + pEventType + "\"");
3405 }
3406 }
string Debug()
Определения CachedEquipmentStorageBase.c:29
ESoundEventType
Определения ReplaceSoundEventHandler.c:2
void ProcessSoundEvent(string pEventType, string pUserString, int pUserInt)
Определения DayZPlayerImplement.c:3535
ref PlayerSoundEventHandler m_PlayerSoundEventHandler
Определения DayZPlayerImplement.c:100
AbstractWave ProcessVoiceEvent(string pEventType, string pUserString, int pUserInt)
Определения DayZPlayerImplement.c:3577
void ProcessAttachmentEvent(string pEventType, string pUserString, int pUserInt)
Определения DayZPlayerImplement.c:3471
bool PlaySoundEvent(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false)
Определения DayZPlayerImplement.c:482
bool PlaySoundEventType(ESoundEventType soundType, int soundEventID, int param=0)
Handle sound event by respective sound handler based on its type.
Определения DayZPlayerImplement.c:481
void ProcessWeaponEvent(string pEventType, string pUserString, int pUserInt)
Определения DayZPlayerImplement.c:3414
ref ReplaceSoundEventHandler m_ReplaceSoundEventHandler
Определения DayZPlayerImplement.c:101
DayZPlayerInstanceType
defined in C++
Определения dayzplayer.c:1071
proto native DayZPlayerInstanceType GetInstanceType()

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