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

◆ SetDecayEffects()

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

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

9644 {
9645 #ifndef NO_GUI
9646 return;
9647 #endif
9648
9649 int boneIdx = GetBoneIndexByName("Spine2");
9650 Particle p;
9651
9652 switch (effect)
9653 {
9654 case PlayerConstants.CORPSE_STATE_MEDIUM :
9655 //play medium sound/flies particle
9656 if (!m_FliesEff)
9657 m_FliesEff = new EffSwarmingFlies();
9658
9659 if (m_FliesEff && !SEffectManager.IsEffectExist(m_FliesIndex))
9660 {
9661 m_FliesEff.SetDecalOwner(this);
9662 m_FliesIndex = SEffectManager.PlayOnObject(m_FliesEff, this, "0 0.25 0");
9663 p = m_FliesEff.GetParticle();
9664 AddChild(p, boneIdx);
9665 if (!m_SoundFliesEffect)
9666 {
9667 PlaySoundSetLoop(m_SoundFliesEffect, "Flies_SoundSet", 1.0, 1.0);
9668 }
9669 }
9670 break;
9671 case PlayerConstants.CORPSE_STATE_DECAYED :
9672 //play serious sound/flies particle
9673 if (!m_FliesEff)
9674 m_FliesEff = new EffSwarmingFlies();
9675
9676 if (m_FliesEff && !SEffectManager.IsEffectExist(m_FliesIndex))
9677 {
9678 m_FliesEff.SetDecalOwner(this);
9679 m_FliesIndex = SEffectManager.PlayOnObject(m_FliesEff, this, "0 0.25 0");
9680 p = m_FliesEff.GetParticle();
9681 AddChild(p, boneIdx);
9682 if (!m_SoundFliesEffect)
9683 {
9684 PlaySoundSetLoop(m_SoundFliesEffect, "Flies_SoundSet", 1.0, 1.0);
9685 }
9686 }
9687 break;
9688 //remove
9689 default:
9690 SEffectManager.DestroyEffect(m_FliesEff);
9691 StopSoundSet(m_SoundFliesEffect);
9692 break;
9693 }
9694 }
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
ref EffectParticle m_FliesEff
Определения PlayerBase.c:121
int m_FliesIndex
Определения PlayerBase.c:109
ref EffectSound m_SoundFliesEffect
Определения PlayerBase.c:136
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().