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

◆ SetDecayEffects()

void ManBase::SetDecayEffects ( int effect = -1)
inlineprotected

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

8929 {
8930 int boneIdx = GetBoneIndexByName("Spine2");
8931 Particle p;
8932
8933 switch (effect)
8934 {
8935 case PlayerConstants.CORPSE_STATE_MEDIUM :
8936 //play medium sound/flies particle
8937 if (!m_FliesEff)
8938 m_FliesEff = new EffSwarmingFlies();
8939
8940 if (m_FliesEff && !SEffectManager.IsEffectExist(m_FliesIndex))
8941 {
8942 m_FliesEff.SetDecalOwner(this);
8943 m_FliesIndex = SEffectManager.PlayOnObject(m_FliesEff, this, "0 0.25 0");
8944 p = m_FliesEff.GetParticle();
8945 AddChild(p, boneIdx);
8946 if (!m_SoundFliesEffect)
8947 {
8948 PlaySoundSetLoop(m_SoundFliesEffect, "Flies_SoundSet", 1.0, 1.0);
8949 }
8950 }
8951 break;
8952 case PlayerConstants.CORPSE_STATE_DECAYED :
8953 //play serious sound/flies particle
8954 if (!m_FliesEff)
8955 m_FliesEff = new EffSwarmingFlies();
8956
8957 if (m_FliesEff && !SEffectManager.IsEffectExist(m_FliesIndex))
8958 {
8959 m_FliesEff.SetDecalOwner(this);
8960 m_FliesIndex = SEffectManager.PlayOnObject(m_FliesEff, this, "0 0.25 0");
8961 p = m_FliesEff.GetParticle();
8962 AddChild(p, boneIdx);
8963 if (!m_SoundFliesEffect)
8964 {
8965 PlaySoundSetLoop(m_SoundFliesEffect, "Flies_SoundSet", 1.0, 1.0);
8966 }
8967 }
8968 break;
8969 //remove
8970 default:
8971 SEffectManager.DestroyEffect(m_FliesEff);
8972 StopSoundSet(m_SoundFliesEffect);
8973 break;
8974 }
8975 }
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
ref EffectParticle m_FliesEff
Определения PlayerBase.c:75
int m_FliesIndex
Определения PlayerBase.c:63
ref EffectSound m_SoundFliesEffect
Определения PlayerBase.c:90
proto native void AddChild(Widget child, bool immedUpdate=true)

Перекрестные ссылки AddChild(), PlayerConstants::CORPSE_STATE_DECAYED, PlayerConstants::CORPSE_STATE_MEDIUM, SEffectManager::DestroyEffect(), GetBoneIndexByName(), SEffectManager::IsEffectExist(), m_FliesEff, m_FliesIndex, m_SoundFliesEffect и SEffectManager::PlayOnObject().

Используется в UpdateCorpseState().