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

◆ SetDecayEffects()

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

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

9027 {
9028 int boneIdx = GetBoneIndexByName("Spine2");
9029 Particle p;
9030
9031 switch (effect)
9032 {
9033 case PlayerConstants.CORPSE_STATE_MEDIUM :
9034 //play medium sound/flies particle
9035 if (!m_FliesEff)
9036 m_FliesEff = new EffSwarmingFlies();
9037
9038 if (m_FliesEff && !SEffectManager.IsEffectExist(m_FliesIndex))
9039 {
9040 m_FliesEff.SetDecalOwner(this);
9041 m_FliesIndex = SEffectManager.PlayOnObject(m_FliesEff, this, "0 0.25 0");
9042 p = m_FliesEff.GetParticle();
9043 AddChild(p, boneIdx);
9044 if (!m_SoundFliesEffect)
9045 {
9046 PlaySoundSetLoop(m_SoundFliesEffect, "Flies_SoundSet", 1.0, 1.0);
9047 }
9048 }
9049 break;
9050 case PlayerConstants.CORPSE_STATE_DECAYED :
9051 //play serious sound/flies particle
9052 if (!m_FliesEff)
9053 m_FliesEff = new EffSwarmingFlies();
9054
9055 if (m_FliesEff && !SEffectManager.IsEffectExist(m_FliesIndex))
9056 {
9057 m_FliesEff.SetDecalOwner(this);
9058 m_FliesIndex = SEffectManager.PlayOnObject(m_FliesEff, this, "0 0.25 0");
9059 p = m_FliesEff.GetParticle();
9060 AddChild(p, boneIdx);
9061 if (!m_SoundFliesEffect)
9062 {
9063 PlaySoundSetLoop(m_SoundFliesEffect, "Flies_SoundSet", 1.0, 1.0);
9064 }
9065 }
9066 break;
9067 //remove
9068 default:
9069 SEffectManager.DestroyEffect(m_FliesEff);
9070 StopSoundSet(m_SoundFliesEffect);
9071 break;
9072 }
9073 }
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().