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

◆ HandleEngineSound()

void BoatScript::HandleEngineSound ( EBoatEngineSoundState state)
inlineprotected

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

607 {
608 if (g_Game.IsHeadlessOrDedicatedServer())
609 return;
610
611 string soundset;
612
613 switch (state)
614 {
615 case EBoatEngineSoundState.START_OK:
616 soundset = m_SoundEngineStart;
617 break;
618 case EBoatEngineSoundState.STOP_OK:
619 soundset = m_SoundEngineStop;
620 break;
621 case EBoatEngineSoundState.START_NO_FUEL:
622 soundset = m_SoundEngineStartNoFuel;
623 break;
624 case EBoatEngineSoundState.STOP_NO_FUEL:
625 soundset = m_SoundEngineStopNoFuel;
626 break;
627 }
628
629 // already playing same type of sound
631 {
632 if (m_SoundEngineEffect.GetSoundSet() == soundset) // already playing same type of sound
633 return;
634 else
635 {
637 m_SoundEngineEffectDeletion.SoundStop(); // stop the existing sound
638
639 m_SoundEngineEffect = null;
640 }
641
642 }
643
644 PlaySound(soundset, m_SoundEngineEffect, ModelToWorld(PropellerGetPosition()));
645 }
DayZGame g_Game
Определения DayZGame.c:4074
void PlaySound()
Определения HungerSoundHandler.c:39
string m_SoundEngineStopNoFuel
Определения BoatScript.c:79
ref EffectSound m_SoundEngineEffect
Определения BoatScript.c:84
string m_SoundEngineStart
Определения BoatScript.c:76
string m_SoundEngineStop
Определения BoatScript.c:77
ref EffectSound m_SoundEngineEffectDeletion
Определения BoatScript.c:85
string m_SoundEngineStartNoFuel
Определения BoatScript.c:78

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

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