97 float stopping_force = (in_speedf - out_speedf) * projectile_weight_coef;
99 return stopping_force;
109 float air_resistance = velocity_min;
121 if (velocity_min < 0.75)
130 if (lifetime_rnd < 0.5)
133 if (velocity_max < 1)
224 vector particle_orientation;
236 particle_orientation = particle_orientation +
"0 -90 0";
237 p.SetOrientation(particle_orientation);
251 particle_orientation = particle_orientation +
"0 270 0";
255 particle_orientation =
"0 0 0";
258 p.SetOrientation(particle_orientation);
270 particle_orientation = particle_orientation +
"0 -90 0";
271 p.SetOrientation(particle_orientation);
282 vector bounce_ori = surfNormalN + inSpeedN;
284 float dot =
vector.
Dot(bounce_ori, surfNormalN);
293 particle_orientation = particle_orientation +
"0 -90 0";
294 p.SetOrientation(particle_orientation);
317 float scaling_by_distance = distance * 0.01;
320 float current_FOV =
Camera.GetCurrentFOV();
321 float config_FOV =
GetDayZGame().GetUserFOVFromConfig();
322 float FOV_scale = current_FOV / config_FOV;
323 scaling_by_distance = 1 + scaling_by_distance * FOV_scale;
325 if (scaling_by_distance > 1.1)
330 particle_orientation[1] = particle_orientation[1] + 270;
331 p_distant.SetOrientation(particle_orientation);
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native vector GetCurrentCameraPosition()
void OnEnterCalculations(Particle p)
static float DEFAULT_PROJECTILE_WEIGHT
static const int SURVIVOR_HEAD
void EffBulletImpactBase()
static const int INFECTED_HEAD
void OnEnterAngledCalculations(Particle p)
void SetSingleParticle(int id)
override void Event_OnStarted()
void OnExitCalculations(Particle p, float outSpeedf)
void SetExitParticle(int id)
void SetRicochetParticle(int id)
float CalculateStoppingForce(float in_speedf, float out_speedf, string ammoType, float weight)
void SetAngledEnterValue(float f)
float m_RicochetSplashCoef
void SetEnterParticle(int id)
void EvaluateEffect(Object directHit, int componentIndex, vector pos, int impact_type, vector surfNormal, vector exitPos, vector inSpeed, vector outSpeed, string ammoType)
override void OnCheckUpdate()
void OnRicochetCalculations(Particle p, float outspeedf)
float m_EnterAngledSplashCoef
Wrapper class for managing particles through SEffectManager.
void SetParticle(Particle p)
Sets the main particle which this Effect will manage.
Legacy way of using particles in the game.
void ScaleParticleParam(int parameter_id, float coef)
Scales the given parameter on all emitors relatively to their CURRENT value.
static Particle PlayInWorld(int particle_id, vector global_pos)
Creates a particle emitter on the given position and activates it.
static const int IMPACT_DISTANT_DUST
proto vector Normalized()
return normalized vector (keeps orginal vector untouched)
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto vector VectorToAngles()
Converts vector to spherical coordinates with radius = 1.
proto native float Length()
Returns length of vector (magnitude)
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
proto native CGame GetGame()
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].