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

◆ SetDecayEffects()

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

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

9273 {
9274 int boneIdx = GetBoneIndexByName("Spine2");
9275 Particle p;
9276
9277 switch (effect)
9278 {
9279 case PlayerConstants.CORPSE_STATE_MEDIUM :
9280 //play medium sound/flies particle
9281 if (!m_FliesEff)
9282 m_FliesEff = new EffSwarmingFlies();
9283
9284 if (m_FliesEff && !SEffectManager.IsEffectExist(m_FliesIndex))
9285 {
9286 m_FliesEff.SetDecalOwner(this);
9287 m_FliesIndex = SEffectManager.PlayOnObject(m_FliesEff, this, "0 0.25 0");
9288 p = m_FliesEff.GetParticle();
9289 AddChild(p, boneIdx);
9290 if (!m_SoundFliesEffect)
9291 {
9292 PlaySoundSetLoop(m_SoundFliesEffect, "Flies_SoundSet", 1.0, 1.0);
9293 }
9294 }
9295 break;
9296 case PlayerConstants.CORPSE_STATE_DECAYED :
9297 //play serious sound/flies particle
9298 if (!m_FliesEff)
9299 m_FliesEff = new EffSwarmingFlies();
9300
9301 if (m_FliesEff && !SEffectManager.IsEffectExist(m_FliesIndex))
9302 {
9303 m_FliesEff.SetDecalOwner(this);
9304 m_FliesIndex = SEffectManager.PlayOnObject(m_FliesEff, this, "0 0.25 0");
9305 p = m_FliesEff.GetParticle();
9306 AddChild(p, boneIdx);
9307 if (!m_SoundFliesEffect)
9308 {
9309 PlaySoundSetLoop(m_SoundFliesEffect, "Flies_SoundSet", 1.0, 1.0);
9310 }
9311 }
9312 break;
9313 //remove
9314 default:
9315 SEffectManager.DestroyEffect(m_FliesEff);
9316 StopSoundSet(m_SoundFliesEffect);
9317 break;
9318 }
9319 }
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
ref EffectParticle m_FliesEff
Определения PlayerBase.c:122
int m_FliesIndex
Определения PlayerBase.c:110
ref EffectSound m_SoundFliesEffect
Определения PlayerBase.c:137
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().