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

◆ Event_OnFrameUpdate()

override void EffEngineSmoke::Event_OnFrameUpdate ( float time_delta)
inlineprivate

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

22 {
23 m_Time += time_delta;
24
26 {
27 m_Time = 0;
28
29 Car parent = Car.Cast( GetAttachmentParent() );
30
31 if (parent)
32 {
33 Particle p = GetParticle();
34 if (p)
35 {
37
38 float speed = parent.GetSpeedometerAbsolute();
39 float lifetime_scale;
40
41 if (speed < 100)
42 lifetime_scale = (100 - speed) / 100;
43 else
44 lifetime_scale = 0.1;
45
46 float birthrate_scale = 1 + (speed * 0.02 );
47
48 p.ScaleParticleParamFromOriginal( EmitorParam.LIFETIME, lifetime_scale );
49 p.ScaleParticleParamFromOriginal( EmitorParam.LIFETIME_RND, lifetime_scale );
50 p.ScaleParticleParamFromOriginal( EmitorParam.BIRTH_RATE, birthrate_scale );
51 p.ScaleParticleParamFromOriginal( EmitorParam.BIRTH_RATE_RND, birthrate_scale );
52 }
53 }
54 }
55 }
Object GetAttachmentParent()
Get the parent set by SetAttachmentParent.
Определения Effect.c:574
float m_Time
Определения EngineSmoke.c:3
float m_UpdateInterval
Определения EngineSmoke.c:4
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
int GetParticleID()
Gets particle id.
Определения Particle.c:297
EmitorParam
Определения EnVisual.c:114

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