Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
VehicleBody.c
Go to the documentation of this file.
1 class VehicleBodyEffectBaseClass: ParticleEffectEntityClass
2 {
3 };
4 
5 class VehicleBodyEffectBase : ParticleEffectEntity
6 {
7  ScriptComponent m_ComponentOwner;
8 
9  void VehicleBodyEffectBase(IEntitySource src, IEntity parent)
10  {}
11 
12  void UpdateVehicleDustEffect(float speed, float start_speed, float end_speed)
13  {
14  float size_coef = Math.AbsFloat( 0.2 + ( (speed - start_speed)*0.8) / end_speed );
15  float speed_coef = Math.AbsFloat( 1 + ( (speed - start_speed)*0.5) / end_speed );
16  float gravity_coef = Math.AbsFloat( 0.8 + ( (speed - start_speed)*0.2) / end_speed );
17 
18  Particles particles = GetParticles();
19  particles.MultParam(-1, EmitterParam.SIZE, size_coef);
20  particles.MultParam(-1, EmitterParam.GRAVITY_SCALE_RND, gravity_coef);
21  particles.MultParam(-1, EmitterParam.VELOCITY, speed_coef);
22  particles.MultParam(-1, EmitterParam.VELOCITY_RND, speed_coef);
23  }
24 };
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
VehicleBodyEffectBase
Definition: VehicleBody.c:5
VehicleBodyEffectBaseClass
Definition: VehicleBody.c:1