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

◆ SimulateDeath()

void DayZPlayer::SimulateDeath ( bool state)
inlineprotected

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

836 {
837 if (g_Game.GetMissionState() != DayZGame.MISSION_STATE_GAME)
838 return;
839
840 LockControls(state);
841
842 if (state)
843 {
844 float duration = DEFAULT_DYING_TIME;
845 if (m_KilledByHeadshot)
846 {
847 duration = 0;
848 }
849
850 if (duration > DYING_PROGRESSION_TIME && !m_IsUnconscious)
851 {
853 m_DeathEffectTimer = new DeathEffectTimer();
854
855 Param2<float,float> par = new Param2<float,float>(duration, DYING_PROGRESSION_TIME);
856 m_DeathEffectTimer.Run(DYING_PROGRESSION_TIME, this, "SetDeathDarknessLevel", par, true);
857 }
858
859 ShowDeadScreen(state, duration);
860
861 g_Game.GetSoundScene().SetSoundVolume(0,0);
862 g_Game.GetSoundScene().SetSpeechExVolume(0,0);
863 g_Game.GetSoundScene().SetMusicVolume(0,0);
864 g_Game.GetSoundScene().SetVOIPVolume(0,0);
865 g_Game.GetSoundScene().SetRadioVolume(0,0);
866 }
867 else
868 {
870 ShowDeadScreen(state, 0);
871 }
872 }
DayZGame g_Game
Определения DayZGame.c:3942
void LockControls(bool state)
Определения DayZPlayerImplement.c:874
override void StopDeathDarkeningEffect()
Определения DayZPlayerImplement.c:826
void ShowDeadScreen(bool show, float duration)
Определения DayZPlayerImplement.c:793
bool m_IsUnconscious
Определения DayZPlayerImplement.c:124
ref DeathEffectTimer m_DeathEffectTimer
Определения DayZPlayerImplement.c:130
static const float DEFAULT_DYING_TIME
Определения DayZPlayerImplement.c:88
static const float DYING_PROGRESSION_TIME
how long does it take to full death screen [s]
Определения DayZPlayerImplement.c:89

Перекрестные ссылки DEFAULT_DYING_TIME, DYING_PROGRESSION_TIME, g_Game, LockControls(), m_DeathEffectTimer, m_IsUnconscious, ShowDeadScreen() и StopDeathDarkeningEffect().