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

◆ SetParticleStateLight()

override void EffExhaustSmoke::SetParticleStateLight ( )
inlineprivate

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

4 {
5 SetParticleState( ParticleList.HATCHBACK_EXHAUST_SMOKE );
6
7 Car parent = Car.Cast( GetAttachmentParent() );
8 Particle p = GetParticle();
9
10 if ( parent && p )
11 {
12 float speed = parent.GetSpeedometerAbsolute();
13 float lifetime_scale;
14
15 if (speed < 100)
16 lifetime_scale = (100 - speed) / 100;
17 else
18 lifetime_scale = 0.1;
19
20 float birthrate_scale = 1 + (speed * 0.1 );
21
22 p.ScaleParticleParamFromOriginal( EmitorParam.LIFETIME, lifetime_scale );
23 p.ScaleParticleParamFromOriginal( EmitorParam.LIFETIME_RND, lifetime_scale );
24 p.ScaleParticleParamFromOriginal( EmitorParam.BIRTH_RATE, birthrate_scale );
25 p.ScaleParticleParamFromOriginal( EmitorParam.BIRTH_RATE_RND, birthrate_scale );
26 }
27 }
Object GetAttachmentParent()
Get the parent set by SetAttachmentParent.
Определения Effect.c:574
void SetParticleState(int state)
Определения VehicleSmoke.c:20
Particle GetParticle()
Gets the main particle which this Effect is managing.
Определения EffectParticle.c:162
void ScaleParticleParamFromOriginal(int parameter_id, float coef)
Scales the given parameter on all emitors relatively to their ORIGINAL value.
Определения Particle.c:678
EmitorParam
Определения EnVisual.c:114

Перекрестные ссылки GetAttachmentParent(), EffectParticle::GetParticle(), ParticleList::HATCHBACK_EXHAUST_SMOKE, Particle::ScaleParticleParamFromOriginal() и EffVehicleSmoke::SetParticleState().