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

Private Member Functions

override void SetParticleStateLight ()
 
override void SetParticleStateHeavy ()
 
void UpdateParticle ()
 

Detailed Description

Definition at line 1 of file CoolantSteam.c.

Member Function Documentation

◆ SetParticleStateHeavy()

override void EffCoolantSteam::SetParticleStateHeavy ( )
inlineprivate

◆ SetParticleStateLight()

override void EffCoolantSteam::SetParticleStateLight ( )
inlineprivate

◆ UpdateParticle()

void EffCoolantSteam::UpdateParticle ( )
inlineprivate

Definition at line 15 of file CoolantSteam.c.

16 {
17 Car parent = Car.Cast(GetAttachmentParent());
19
20 if (parent && p)
21 {
22 float speed = parent.GetSpeedometerAbsolute();
23
24 float lifetime_scale = (100 - speed) / 100;
25 if (lifetime_scale < 0.1)
26 lifetime_scale = 0.1;
27
28 float birthrate_scale = 1 + (speed * 0.02);
29
30 float speed_scale = 1 + (speed * 0.2);
31 if (speed_scale > 10)
32 speed_scale = 10;
33
34 float size_scale = 1 + (speed * 0.05);
35
36 if (size_scale > 2.5)
37 size_scale = 2.5;
38
39 float gravity_add = speed * 0.005 ;
40
41 p.ScaleParticleParamFromOriginal(EmitorParam.LIFETIME, lifetime_scale);
42 p.ScaleParticleParamFromOriginal(EmitorParam.LIFETIME_RND, lifetime_scale);
43 p.ScaleParticleParamFromOriginal(EmitorParam.BIRTH_RATE, birthrate_scale);
44 p.ScaleParticleParamFromOriginal(EmitorParam.BIRTH_RATE_RND, birthrate_scale);
45 p.ScaleParticleParamFromOriginal(EmitorParam.VELOCITY, speed_scale);
46 p.ScaleParticleParamFromOriginal(EmitorParam.VELOCITY_RND, speed_scale);
47 p.ScaleParticleParamFromOriginal(EmitorParam.SIZE, size_scale);
48 p.SetParticleParam(EmitorParam.GRAVITY_SCALE, gravity_add);
49 }
50 }
Object GetAttachmentParent()
Get the parent set by SetAttachmentParent.
Definition Effect.c:554
Particle GetParticle()
Gets the main particle which this Effect is managing.
Legacy way of using particles in the game.
Definition Particle.c:7
EmitorParam
Definition EnVisual.c:114

References GetAttachmentParent(), and EffectParticle::GetParticle().

Referenced by SetParticleStateHeavy(), and SetParticleStateLight().


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