DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnEnterCalculations()

void EffBulletImpactBase::OnEnterCalculations ( Particle p)
inlineprivate

См. определение в файле BulletImpactBase.c строка 102

103 {
104 // All values represent scale
105 float velocity_min = (m_StoppingForce * m_EnterSplashCoef);
106 float velocity_max = (m_StoppingForce * m_EnterSplashCoef);
107 float size = (m_StoppingForce * m_EnterSplashCoef);
108 float birth_rate = (m_StoppingForce * m_EnterSplashCoef);
109 float air_resistance = velocity_min;
110 float lifetime = (m_StoppingForce * m_EnterSplashCoef);
111 float lifetime_rnd = (m_StoppingForce * m_EnterSplashCoef);
112
113 if ( m_AmmoType == "Bullet_12GaugePellets" )
114 {
115 birth_rate *= 0.5;
116 velocity_min *= 2;
117 velocity_max *= 2;
118 }
119
120
121 if (velocity_min < 0.75)
122 velocity_min = 0.75;
123
124 if (size < 0.75)
125 size = 0.75;
126
127 if (lifetime < 0.5)
128 lifetime = 0.5;
129
130 if (lifetime_rnd < 0.5)
131 lifetime_rnd = 0.5;
132
133 if (velocity_max < 1)
134 velocity_max = 1;
135
136 /*Print("===============");
137 Print(velocity_min);
138 Print(velocity_max);
139 Print(size);
140 Print(birth_rate);
141 Print(air_resistance);
142 Print(lifetime);
143 Print(lifetime_rnd);*/
144
145 p.ScaleParticleParam(EmitorParam.VELOCITY, velocity_min);
146 p.ScaleParticleParam(EmitorParam.VELOCITY_RND, velocity_max);
147 p.ScaleParticleParam(EmitorParam.SIZE, size);
148 p.ScaleParticleParam(EmitorParam.BIRTH_RATE, birth_rate);
149 p.ScaleParticleParam(EmitorParam.AIR_RESISTANCE, air_resistance);
150 p.ScaleParticleParam(EmitorParam.AIR_RESISTANCE_RND, air_resistance);
151 p.ScaleParticleParam(EmitorParam.LIFETIME, lifetime);
152 p.ScaleParticleParam(EmitorParam.LIFETIME_RND, lifetime_rnd);
153 }
string m_AmmoType
Определения BulletImpactBase.c:19
float m_StoppingForce
Определения BulletImpactBase.c:10
float m_EnterSplashCoef
Определения BulletImpactBase.c:29
void ScaleParticleParam(int parameter_id, float coef)
Scales the given parameter on all emitors relatively to their CURRENT value.
Определения Particle.c:697
EmitorParam
Определения EnVisual.c:114

Перекрестные ссылки m_AmmoType, m_EnterSplashCoef, m_StoppingForce и Particle::ScaleParticleParam().

Используется в Event_OnStarted().