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

◆ SetContaminatedEffectEx()

void ManBase::SetContaminatedEffectEx ( bool enable,
int ppeIdx = -1,
int aroundId = ParticleList.CONTAMINATED_AREA_GAS_AROUND,
int tinyId = ParticleList.CONTAMINATED_AREA_GAS_TINY,
string soundset = "",
bool partDynaUpdate = false,
int newBirthRate = 0 )
inlineprotected

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

5779 {
5780 if (enable) // enable
5781 {
5782 // We assume that if this is set to true the PPE is already active
5783 if (m_ContaminatedAreaEffectEnabled == enable)
5784 return;
5785
5786 if (aroundId !=0)
5787 {
5789 {
5790 m_ContaminatedAroundPlayer = ParticleManager.GetInstance().PlayInWorld(aroundId, GetPosition());
5791 }
5792 // First entry in an area with dynamic tweaks to particles
5793 if (partDynaUpdate)
5794 {
5795 m_ContaminatedAroundPlayer.SetParameter(0, EmitorParam.BIRTH_RATE, newBirthRate);
5796 }
5797 }
5798
5799 if (!m_ContaminatedAroundPlayerTiny && tinyId !=0)
5800 {
5801 m_ContaminatedAroundPlayerTiny = ParticleManager.GetInstance().PlayInWorld(tinyId, GetPosition());
5802 }
5803
5804 if (ppeIdx != -1)
5805 {
5806 PPERequesterBase ppeRequester;
5807 if (Class.CastTo(ppeRequester, PPERequesterBank.GetRequester(ppeIdx)))
5808 ppeRequester.Start();
5809 }
5810
5811 // We start playing the ambient sound
5812 if (!m_AmbientContamination && soundset != "")
5813 PlaySoundSetLoop(m_AmbientContamination, soundset, 0.1, 0.1);
5814
5815 SetSoundControllerOverride("contamination",1,SoundControllerAction.Overwrite);
5816 }
5817 else // disable
5818 {
5820 {
5823 }
5824
5826 {
5829 }
5830 if (ppeIdx != -1)
5831 PPERequesterBank.GetRequester(ppeIdx).Stop(new Param1<bool>(true)); //fade out
5832
5833 // We stop the ambient sound
5835 StopSoundSet(m_AmbientContamination);
5836
5837 SetSoundControllerOverride("contamination",0,SoundControllerAction.None);
5838 // We make sure to reset the state
5839 }
5841 }
void PPERequesterBase(int requester_IDX)
Определения PPERequestPlatformsBase.c:445
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Определения ParticleManager.c:88
static Particle m_ContaminatedAroundPlayerTiny
Определения PlayerBase.c:323
EffectSound m_AmbientContamination
Определения PlayerBase.c:208
bool m_ContaminatedAreaEffectEnabled
Определения PlayerBase.c:206
static Particle m_ContaminatedAroundPlayer
Определения PlayerBase.c:322
void Start(Param par=null)
Определения PPERequestPlatformsBase.c:38
EmitorParam
Определения EnVisual.c:114
SetSoundControllerOverride(string controllerName, float value, SoundControllerAction action)
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473

Перекрестные ссылки Class::CastTo(), GetPosition(), m_AmbientContamination, m_ContaminatedAreaEffectEnabled, m_ContaminatedAroundPlayer, m_ContaminatedAroundPlayerTiny, ParticleManager(), SetSoundControllerOverride() и PPERequesterBase::Start().

Используется в RemoveCurrentEffectTrigger(), RequestTriggerEffect(), SetContaminatedEffect() и ~PlayerBase().