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

◆ HandleEngineSound()

void BoatScript::HandleEngineSound ( EBoatEngineSoundState state)
inlineprotected

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

543 {
544 if (GetGame().IsDedicatedServer())
545 return;
546
547 string soundset;
548
549 switch (state)
550 {
551 case EBoatEngineSoundState.START_OK:
552 soundset = m_SoundEngineStart;
553 break;
554 case EBoatEngineSoundState.STOP_OK:
555 soundset = m_SoundEngineStop;
556 break;
557 case EBoatEngineSoundState.START_NO_FUEL:
558 soundset = m_SoundEngineStartNoFuel;
559 break;
560 case EBoatEngineSoundState.STOP_NO_FUEL:
561 soundset = m_SoundEngineStopNoFuel;
562 break;
563 }
564
565 // already playing same type of sound
567 {
568 if (m_SoundEngineEffect.GetSoundSet() == soundset) // already playing same type of sound
569 return;
570 else
571 {
573 m_SoundEngineEffectDeletion.SoundStop(); // stop the existing sound
574
575 m_SoundEngineEffect = null;
576 }
577
578 }
579
580 PlaySound(soundset, m_SoundEngineEffect, ModelToWorld(PropellerGetPosition()));
581 }
void PlaySound()
Определения HungerSoundHandler.c:38
string m_SoundEngineStopNoFuel
Определения BoatScript.c:71
ref EffectSound m_SoundEngineEffect
Определения BoatScript.c:76
string m_SoundEngineStart
Определения BoatScript.c:68
string m_SoundEngineStop
Определения BoatScript.c:69
ref EffectSound m_SoundEngineEffectDeletion
Определения BoatScript.c:77
string m_SoundEngineStartNoFuel
Определения BoatScript.c:70
proto native CGame GetGame()

Перекрестные ссылки GetGame(), m_SoundEngineEffect, m_SoundEngineEffectDeletion, m_SoundEngineStart, m_SoundEngineStartNoFuel, m_SoundEngineStop, m_SoundEngineStopNoFuel и PlaySound().

Используется в OnBeforeEngineStart(), OnEngineStart(), OnEngineStop() и OnVariablesSynchronized().