Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
BTRBodyDustTrail.c
Go to the documentation of this file.
4
5class BTRBodyDustTrail : VehicleBodyEffectBase
6{
7 void BTRBodyDustTrail(IEntitySource src, IEntity parent)
8 {
9 SetEffectPath("{21AB2949F7DAD15A}Particles/Vehicle/Vehicle_dust_car_BTR_wheel_default.ptc");
10 }
11
12 override void UpdateVehicleDustEffect(float speed, float start_speed, float end_speed)
13 {
14 float size_coef = Math.AbsFloat( 0.5 + ( (speed - start_speed)*0.5) / end_speed );
15 float speed_coef = Math.AbsFloat( (speed - start_speed) / end_speed );
16 float gravity_coef = Math.AbsFloat( (speed - start_speed) / end_speed );
17
18 size_coef = Math.Clamp(size_coef , 0, 1);
19 speed_coef = Math.Clamp(speed_coef , 0, 1);
20 gravity_coef = Math.Clamp(gravity_coef , 0, 1);
21
22
23 Particles particles = GetParticles();
24 particles.MultParam(-1, EmitterParam.SIZE, size_coef);
25 particles.MultParam(-1, EmitterParam.GRAVITY_SCALE_RND, gravity_coef);
26 particles.MultParam(-1, EmitterParam.VELOCITY, speed_coef);
27 particles.MultParam(-1, EmitterParam.VELOCITY_RND, speed_coef);
28 }
29};
Definition Math.c:13
proto external void SetEffectPath(ResourceName effectPath)
EmitterParam