DayZ 1.24
Loading...
Searching...
No Matches
EffExhaustSmoke Class Reference
Inheritance diagram for EffExhaustSmoke:
[legend]
Collaboration diagram for EffExhaustSmoke:
[legend]

Private Member Functions

override void SetParticleStateLight ()
 

Detailed Description

Definition at line 1 of file ExhaustSmoke.c.

Member Function Documentation

◆ SetParticleStateLight()

override void EffExhaustSmoke::SetParticleStateLight ( )
inlineprivate

Definition at line 3 of file ExhaustSmoke.c.

4 {
6
7 Car parent = Car.Cast(GetAttachmentParent());
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.
Definition Effect.c:554
void SetParticleState(int state)
Particle GetParticle()
Gets the main particle which this Effect is managing.
Legacy way of using particles in the game.
Definition Particle.c:7
static const int HATCHBACK_EXHAUST_SMOKE
EmitorParam
Definition EnVisual.c:114

References GetAttachmentParent(), EffectParticle::GetParticle(), ParticleList::HATCHBACK_EXHAUST_SMOKE, and EffVehicleSmoke::SetParticleState().


The documentation for this class was generated from the following file: