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

◆ HandleEngineSound()

void BoatScript::HandleEngineSound ( EBoatEngineSoundState state)
inlineprotected

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

599 {
600 if (GetGame().IsDedicatedServer())
601 return;
602
603 string soundset;
604
605 switch (state)
606 {
607 case EBoatEngineSoundState.START_OK:
608 soundset = m_SoundEngineStart;
609 break;
610 case EBoatEngineSoundState.STOP_OK:
611 soundset = m_SoundEngineStop;
612 break;
613 case EBoatEngineSoundState.START_NO_FUEL:
614 soundset = m_SoundEngineStartNoFuel;
615 break;
616 case EBoatEngineSoundState.STOP_NO_FUEL:
617 soundset = m_SoundEngineStopNoFuel;
618 break;
619 }
620
621 // already playing same type of sound
623 {
624 if (m_SoundEngineEffect.GetSoundSet() == soundset) // already playing same type of sound
625 return;
626 else
627 {
629 m_SoundEngineEffectDeletion.SoundStop(); // stop the existing sound
630
631 m_SoundEngineEffect = null;
632 }
633
634 }
635
636 PlaySound(soundset, m_SoundEngineEffect, ModelToWorld(PropellerGetPosition()));
637 }
void PlaySound()
Определения HungerSoundHandler.c:38
string m_SoundEngineStopNoFuel
Определения BoatScript.c:82
ref EffectSound m_SoundEngineEffect
Определения BoatScript.c:87
string m_SoundEngineStart
Определения BoatScript.c:79
string m_SoundEngineStop
Определения BoatScript.c:80
ref EffectSound m_SoundEngineEffectDeletion
Определения BoatScript.c:88
string m_SoundEngineStartNoFuel
Определения BoatScript.c:81
proto native CGame GetGame()

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

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