DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
DustEffectsManager.c
См. документацию.
2{
3
4 protected static ref DustEffectManager m_Instance = NULL;
5
13
15
16 protected bool m_EnableCloudEffect;
17 protected int m_CloudEffectId;
19 protected float m_CloudEffectCooldown;
20 protected float m_CloudEffectCooldownMin;
21 protected float m_CloudEffectCooldownMax;
22 protected float m_CloudEffectThreshold;
23 protected float m_CloudEffectDurationMin;
24 protected float m_CloudEffectDurationMax;
25 protected float m_CloudEffectDuration;
27
28
29 protected bool m_EnableGroundEffect;
30 protected float m_GroundEffectRadius;
31 protected float m_GroundEffectThreshold;
32 protected float m_GroundEffectIntensity;
34 protected float m_GroundEffectWindWeight;
39 protected float m_GroundEffectSizeMin;
40 protected float m_GroundEffectSizeMax;
41
42 protected bool m_EnableCeilingDustEffect = true; //'on' by default
43
44 protected ref static map<int, string> m_ParticleIDEffectPairing; //<particleID, effect type>
45
46 protected const float CLOUD_EFFECT_ORIGIN_HEIGHT = 1.5;
47 protected const float CLOUD_EFFECT_SPEED_ADJUSTMENT = 3.5;
48 protected const float GROUND_EFFECT_SPEED_COEFICIENT = 20;
49 protected const float GROUND_EFFECT_SPEED_ADJUSTMENT = 3;
50 protected const float GROUND_EFFECT_END_TEST_DISTANCE = 3;
51 protected const float GROUND_EFFECT_WIND_BIAS_SPREAD_SCALE = 0.6;
52 protected const float GROUND_EFFECT_WIND_BIAS_VARIATION_RANGE = 0.4;
53
54
56
57
59
61
62 const float BASE_FREQUENCY = 500;
63
64 //Cloud
65
66 const float CLOUD_BASE_FREQUENCY = 10;
67 const float CLOUD_BASE_DURATION = 20;
68
69 protected float m_TimeEffectCloud;
70 protected float m_ActualDurationCloud;
71 protected bool m_ActiveCloudEffect;
72
74 {
75 }
76
77 void Init(PlayerBase player)
78 {
79 m_Player = player;
80
81 DustEffectsSettings dustEffectsSettings = GetGame().GetMission().GetWorldData().GetDustEffectsSettings();
82
83 if (dustEffectsSettings.m_GroundEffectEnable)
84 {
85
86 InitGroundEffect(dustEffectsSettings);
88 }
89 else
90 {
92 }
93
94 if (dustEffectsSettings.m_CloudEffectEnable)
95 {
96 InitCloudEffect(dustEffectsSettings);
98 }
99 else
100 {
102 }
103 //InitGroundEffect(50, 5, 0, 0);
104 //InitCloudEffect(20, 1, 1, 0);
105
107 }
108
109 void InitGroundEffect(DustEffectsSettings dustEffectsSettings)
110 {
112
113 SetGroundEffectThreshold(dustEffectsSettings.m_GroundEffectMinWindStrength);
114 SetGroundEffectIntensity(dustEffectsSettings.m_GroundEffectFrequency);
115 SetGroundEffectRadius(dustEffectsSettings.m_GroundEffectDistance);
116 SetGroundEffectWindWeight(dustEffectsSettings.m_GroundEffectWindWeight);
117 SetGroundEffectEndPointTest(dustEffectsSettings.m_GroundEffectEndPoindTest);
118 m_GroundEffectLifetimeMin = dustEffectsSettings.m_GroundEffectLifetimeMin;
119 m_GroundEffectLifetimeMax = dustEffectsSettings.m_GroundEffectLifetimeMax;
120 m_GroundEffectSizeMin = dustEffectsSettings.m_GroundEffectSizeMin;
121 m_GroundEffectSizeMax = dustEffectsSettings.m_GroundEffectSizeMax;
122
125 }
126
127 void InitCloudEffect(DustEffectsSettings dustEffectsSettings)
128 {
129 m_EnableCloudEffect = true;
130
131 SetCloudEffectDistance(dustEffectsSettings.m_CloudEffectDistance);
132 SetCloudEffectCooldownMin(dustEffectsSettings.m_CloudEffectCooldownMin);
133 SetCloudEffectCooldownMax(dustEffectsSettings.m_CloudEffectCooldownMax);
134 SetCloudEffectCooldown(dustEffectsSettings.m_CloudEffectCooldownMin);
135 SetCloudEffectDurationMin(dustEffectsSettings.m_CloudEffectDurationMin);
136 SetCloudEffectDurationMax(dustEffectsSettings.m_CloudEffectDurationMax);
137 SetCloudEffectDuration(dustEffectsSettings.m_CloudEffectDurationMin);
138 SetCloudEffectThreshold(dustEffectsSettings.m_CloudEffectMinWindStrength);
139 SetCloudEffectReadFromSurfaceEnable(dustEffectsSettings.m_CloudEffectFromSurface);
140
141 m_ActiveCloudEffect = false;
142 m_TimeEffectCloud = 0.0;
143
145 m_CloudEffectId = -1;
146 }
147
148 protected void InitCeilingEffect()
149 {
151
152 RegisterCeilingPair(ParticleList.CEILING_WOOD, "CeilingDustEffectWood");
153 }
154
155 protected void RegisterCeilingPair(int particleID, string effectType)
156 {
157 m_ParticleIDEffectPairing.Set(particleID, effectType);
158 }
159
160 void Update(float deltaT)
161 {
163 {
164 EUndergroundPresence presence = m_Player.GetUndergroundPresence();
165 bool temporaryDisable = false;
166
167 if (presence != EUndergroundPresence.NONE)
168 {
170 }
171 else
172 {
173 vector wind = GetGame().GetWeather().GetWind();
174 float windStr = wind.Normalize();
175
177 UpdateGroundEffect(deltaT, windStr);
179 UpdateCloudEffect(deltaT, windStr);
180 }
181 }
182 }
183
184 void UpdateGroundEffect(float deltaT, float windStrength)
185 {
186 if(windStrength > m_GroundEffectThreshold)
187 {
189 float tresholdModificator = 1 + ((windStrength - 10) * m_GroundEffectWindWeight / 10);
190
191 if((m_TimeFromLastGroundEffect * tresholdModificator) > m_ActualGroundEffectPeriod)
192 {
195 }
196 }
197 }
198
199 void UpdateCloudEffect(float deltaT, float windStrength)
200 {
201 m_TimeEffectCloud += deltaT;
202
203
205 {
207 {
211 }
212 else
213 {
215 }
216 }
217 else
218 {
219 if( windStrength > m_CloudEffectThreshold )
220 {
222 {
226 }
227 }
228 }
229 }
230
232 {
234 {
236 vector dustPosition;
237 vector dustRotation;
238
239 CalculateCloudEffectPosRot(dustPosition, dustRotation);
240
241 effect.SetLocalPosition(dustPosition);
242 effect.SetAttachedLocalOri(dustRotation);
243 }
244 }
245
246 protected void CreateGroundEffect()
247 {
248 bool canCreateEffect = true;
249 int particleID = ParticleList.NONE;
250 vector wind = g_Game.GetWeather().GetWind();
251 float windStrength = wind.Normalize();
253
254 SurfaceInfo surfaceInfo;
255 float spawnPointHeight;
256 surfaceInfo = g_Game.GetSurfaceInfoOn(spawnPoint[0], spawnPoint[2], spawnPointHeight);
257 spawnPoint[1] = spawnPointHeight;
258
260 {
261 vector endPoint;
262 endPoint = spawnPoint + (wind * GROUND_EFFECT_END_TEST_DISTANCE);
263 SurfaceInfo endPointSurfaceInfo;
264 float endPointSurfaceHeight;
265 endPointSurfaceInfo = g_Game.GetSurfaceInfoOn(endPoint[0], endPoint[2], endPointSurfaceHeight);
266
267 if (surfaceInfo.GetSurfaceType() != endPointSurfaceInfo.GetSurfaceType())
268 {
269 canCreateEffect = false;
270 }
271 }
272
273 if (canCreateEffect)
274 {
275 particleID = surfaceInfo.GetGroundEffectParticleId();
276 if (particleID == ParticleList.NONE || particleID == ParticleList.INVALID)
277 {
278 canCreateEffect = false;
279 }
280 }
281
282 if (canCreateEffect)
283 {
284 spawnPoint[1] = GetGame().SurfaceY(spawnPoint[0],spawnPoint[2]);
285
286 ParticleSource source = ParticleManager.GetInstance().PlayInWorldEx(particleID, null, spawnPoint, "0 0 0", true);
287
288
289 float output;
290
291 GetParticleParm(source, -1, EmitorParam.LIFETIME, output);
292 GetParticleParm(source, -1, EmitorParam.SIZE, output);
293
294
299
300 vector dustOrientation = wind;
301
302 dustOrientation[0] = wind[0];
303 dustOrientation[1] = wind[2];
304
305 float yaw = dustOrientation.VectorToYaw();
306
307 vector surfaceNormal = GetGame().SurfaceGetNormal(spawnPoint[0],spawnPoint[2]);
308 float dotWithForward = vector.Dot(surfaceNormal, wind);
309
310 float pitch = Math.Atan2(-dotWithForward, surfaceNormal[1]) * Math.RAD2DEG;
311
312 dustOrientation[0] = -yaw;
313 dustOrientation[1] = 0;
314 dustOrientation[2] = -pitch;
315
316 source.SetOrientation(dustOrientation);
317 }
318 }
319
321 {
322 vector PlayerPos = m_Player.GetPosition();
323 vector PlayerSpeed = GetPlayerSpeed();
324 float PlayerSpeedStr = PlayerSpeed.Normalize();
325
326 PlayerSpeed[1] = PlayerSpeed[2];
327 float yaw = PlayerSpeed.VectorToYaw();
328
329 float coef = 1 + (PlayerSpeedStr / GROUND_EFFECT_SPEED_COEFICIENT);
330
333
334 vector point = Vector(x, 0.0, z);
335
336 point = vector.RotateAroundZeroDeg(point, vector.Up, -yaw);
337
338 return PlayerPos + point;
339 }
340
342 {
343 vector playerSpeed;
344
345 if (m_Player.IsInVehicle())
346 {
347 HumanCommandVehicle vehCommand = m_Player.GetCommand_Vehicle();
348 if (vehCommand)
349 {
350 Transport trans = vehCommand.GetTransport();
351 if (trans)
352 {
353 playerSpeed = trans.GetSpeed();
354 }
355 }
356 }
357 else
358 {
359 m_Player.PhysicsGetVelocity(playerSpeed);
360 }
361
362 return playerSpeed;
363 }
364
365 protected bool CreateCloudEffect()
366 {
368 {
369 SurfaceInfo surfaceInfo = g_Game.GetSurfaceInfoUnderObject(m_Player);
370
371 EffCloudDust eff = new EffCloudDust();
373 eff.SelectFromSurface(surfaceInfo);
374 else
375 eff.SetDefault();
376
377 vector dustPosition;
378 vector dustRotation;
379
380 CalculateCloudEffectPosRot(dustPosition, dustRotation);
381 m_CloudEffectId = SEffectManager.PlayOnObject(eff, m_Player, dustPosition, dustRotation, true);
382 }
383 m_ActiveCloudEffect = true;
384 return true;
385 }
386
387 void CalculateCloudEffectPosRot(out vector cloudPositon, out vector cloudRotation)
388 {
389 vector wind = GetGame().GetWeather().GetWind();
390 float windStr = wind.Normalize();
391
392 //Rotation calculation
393 vector rotation = wind;
394
395 rotation[1] = rotation[2];
396 float yaw = rotation.VectorToYaw();
397
398 rotation[0] = -yaw;
399 rotation[1] = 0;
400 rotation[2] = 0;
401 //End Roration calculation
402
403 //Position calculation
404 vector playerSpeed = GetPlayerSpeed();
405
406 float playerSpeedStr = playerSpeed.Normalize();
407 float CloudEffectDistance = m_CloudEffectBaseDistance;
408
409 vector pos = -(wind * m_CloudEffectBaseDistance);
410 pos = pos + (playerSpeed * playerSpeedStr * CLOUD_EFFECT_SPEED_ADJUSTMENT);
412 //End position calculation
413
414
415 cloudPositon = pos;
416 cloudRotation = rotation;
417 }
418
428
429
430 //#ifdef DIAG_DEVELOPER
431 void SetCloudEffectEnable(bool enable)
432 {
433 #ifdef DIAG_DEVELOPER
434 #ifndef SERVER
435 DiagMenu.SetValue(DiagMenuIDs.MISC_DUST_EFFECTS_CLOUD_ENABLE, enable);
436 #endif
437 #endif
438 m_EnableCloudEffect = enable;
440 }
441
443 {
444 return m_EnableCloudEffect;
445 }
446
447 void SetGroundEffectEnable(bool enable)
448 {
449 #ifdef DIAG_DEVELOPER
450 #ifndef SERVER
451 DiagMenu.SetValue(DiagMenuIDs.MISC_DUST_EFFECTS_GROUND_ENABLE, enable);
452 #endif
453 #endif
454 m_EnableGroundEffect = enable;
455 }
456
458 {
460 }
461
462 void SetCloudEffectThreshold(float threshold)
463 {
464 #ifdef DIAG_DEVELOPER
465 #ifndef SERVER
466 DiagMenu.SetRangeValue(DiagMenuIDs.MISC_DUST_EFFECTS_CLOUD_THRESHOLD, threshold);
467 #endif
468 #endif
469 m_CloudEffectThreshold = threshold;
470 }
471
473 {
475 }
476
477 void SetCloudEffectDistance(float distance)
478 {
479 #ifdef DIAG_DEVELOPER
480 #ifndef SERVER
481 DiagMenu.SetRangeValue(DiagMenuIDs.MISC_DUST_EFFECTS_CLOUD_DISTANCE, distance);
482 #endif
483 #endif
484 m_CloudEffectBaseDistance = distance;
485 }
486
488 {
490 }
491
496
497 void SetCloudEffectCooldownMin(float cooldown)
498 {
499 m_CloudEffectCooldownMin = cooldown;
500 }
501
502 void SetCloudEffectCooldownMax(float cooldown)
503 {
504 m_CloudEffectCooldownMax = cooldown;
505 }
506
507 void SetCloudEffectCooldown(float cooldown)
508 {
509 m_CloudEffectCooldown = cooldown;
510 }
511
513 {
515 }
516
518 {
519 float randMulti = Math.RandomFloat01();
521 return cooldown;
522 }
523
528
529 void SetCloudEffectDurationMin(float duration)
530 {
531 m_CloudEffectDurationMin = duration;
532 }
533
534 void SetCloudEffectDurationMax(float duration)
535 {
536 m_CloudEffectDurationMax = duration;
537 }
538
539 void SetCloudEffectDuration(float duration)
540 {
541 m_CloudEffectDuration = duration;
542 }
543
545 {
547 }
548
550 {
551 float randMulti = Math.RandomFloat01();
553 return duration;
554 }
555
557 {
558 #ifdef DIAG_DEVELOPER
559 #ifndef SERVER
560 DiagMenu.SetValue(DiagMenuIDs.MISC_DUST_EFFECTS_CLOUD_GETFROMSURFACE, enable);
561 #endif
562 #endif
564 }
565
570
571 void SetGroundEffectThreshold(float threshold)
572 {
573 #ifdef DIAG_DEVELOPER
574 #ifndef SERVER
575 DiagMenu.SetRangeValue(DiagMenuIDs.MISC_DUST_EFFECTS_GROUND_THRESHOLD, threshold);
576 #endif
577 #endif
578 m_GroundEffectThreshold = threshold;
579 }
580
582 {
584 }
585
586 void SetGroundEffectIntensity(float intensity)
587 {
588 #ifdef DIAG_DEVELOPER
589 #ifndef SERVER
590 DiagMenu.SetRangeValue(DiagMenuIDs.MISC_DUST_EFFECTS_GROUND_INTESITY, intensity);
591 #endif
592 #endif
593 m_GroundEffectIntensity = intensity;
594
595 int intensityLevel = m_GroundEffectIntensity / 10;
596 int intensityMod = Math.ModFloat( m_GroundEffectIntensity, 10);
597
598 float frequency = Math.Pow(10, - intensityLevel);
599
600 m_ActualGroundEffectPeriod = frequency * (10 - intensityMod);
601 }
602
604 {
606 }
607
608 void SetGroundEffectRadius(float radius)
609 {
610 #ifdef DIAG_DEVELOPER
611 #ifndef SERVER
612 DiagMenu.SetRangeValue(DiagMenuIDs.MISC_DUST_EFFECTS_GROUND_RADIUS, radius);
613 #endif
614 #endif
615 m_GroundEffectRadius = radius;
616 }
617
619 {
621 }
622
623 void SetGroundEffectWindWeight(float windWeight)
624 {
625 #ifdef DIAG_DEVELOPER
626 #ifndef SERVER
627 DiagMenu.SetRangeValue(DiagMenuIDs.MISC_DUST_EFFECTS_GROUND_WINDWEIGHT, windWeight);
628 #endif
629 #endif
630 m_GroundEffectWindWeight = windWeight / 10;
631 }
632
633 void SetGroundEffectEndPointTest(bool endPointtest)
634 {
635 m_GroundEffectTestEndPoint = endPointtest;
636 }
637
639 {
640 return m_GroundEffectWindWeight * 10;
641 }
642
644 {
645 #ifdef DIAG_DEVELOPER
646 #ifndef SERVER
647 DiagMenu.SetValue(DiagMenuIDs.MISC_DUST_EFFECTS_GROUND_GETFROMSURFACE, enable);
648 #endif
649 #endif
651 }
652
657
658 // Returns a value in [minVal, maxVal] biased toward max by wind strength.
659 // At low wind: result is closer to min with high spread.
660 // At high wind: result is closer to max with lower spread.
661 protected float ComputeWindBiasedValue(float windStrength, float minVal, float maxVal)
662 {
663 float windT = Math.Clamp(windStrength / GROUND_EFFECT_SPEED_COEFICIENT, 0, 1);
664 float spreadScale = 1 - windT * GROUND_EFFECT_WIND_BIAS_SPREAD_SCALE;
666 float t = Math.Clamp(windT + variation, 0, 1);
667 return minVal + t * (maxVal - minVal);
668 }
669
670 void SetGroundEffectLifetimeRange(float minLifetime, float maxLifetime)
671 {
672 m_GroundEffectLifetimeMin = minLifetime;
673 m_GroundEffectLifetimeMax = maxLifetime;
674 }
675
680
685
686 void SetGroundEffectSizeRange(float minSize, float maxSize)
687 {
688 m_GroundEffectSizeMin = minSize;
689 m_GroundEffectSizeMax = maxSize;
690 }
691
693 {
695 }
696
698 {
700 }
701
702 //-----------------------------------------
703 //ceiling dust part
704
706 static void AdjustCeilingDustEffectFrequency(string surfaceType, int particleID, inout int min, inout int max)
707 {
708 switch (particleID)
709 {
711 {
712 min = 5;
713 max = 10;
714 return;
715 }
716 }
717 }
718
720 static string GetCeilingEffectType(int particleID)
721 {
722 string ret = m_ParticleIDEffectPairing.Get(particleID);
723 if (ret == string.Empty)
724 {
725 ErrorEx("No 'CeilingDustEffectBase'-type paired to particle ID " + particleID + ", using default value. Please add registration into the 'InitCeilingEffect' method.");
726 ret = "CeilingDustEffecter";
727 }
728 return ret;
729 }
730
735
737 {
739 }
740 //-----------------------------------------
741
742 //#endif
743}
DayZGame g_Game
Определения DayZGame.c:4074
DiagMenuIDs
Определения EDiagMenuIDs.c:2
void Effect()
ctor
Определения Effect.c:72
Empty
Определения Hand_States.c:14
Icon x
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Определения ParticleManager.c:88
EUndergroundPresence
Определения UndergroundHandlerClient.c:2
Определения EnDebug.c:241
void SetGroundEffectIntensity(float intensity)
Определения DustEffectsManager.c:586
void SetGroundEffectWindWeight(float windWeight)
Определения DustEffectsManager.c:623
void SetCloudEffectThreshold(float threshold)
Определения DustEffectsManager.c:462
const float GROUND_EFFECT_SPEED_COEFICIENT
Определения DustEffectsManager.c:48
const float CLOUD_BASE_FREQUENCY
Определения DustEffectsManager.c:66
float m_GroundEffectIntensity
Определения DustEffectsManager.c:32
float GetCloudEffectCooldownMin()
Определения DustEffectsManager.c:492
const float CLOUD_EFFECT_ORIGIN_HEIGHT
Определения DustEffectsManager.c:46
vector GetPlayerSpeed()
Определения DustEffectsManager.c:341
bool m_EnableCeilingDustEffect
Определения DustEffectsManager.c:42
float GetGroundEffectLifetimeMax()
Определения DustEffectsManager.c:681
void SetCloudEffectCooldownMin(float cooldown)
Определения DustEffectsManager.c:497
float ComputeWindBiasedValue(float windStrength, float minVal, float maxVal)
Определения DustEffectsManager.c:661
void SetGroundEffectRadius(float radius)
Определения DustEffectsManager.c:608
const float CLOUD_BASE_DURATION
Определения DustEffectsManager.c:67
float GetCloudEffectDurationMin()
Определения DustEffectsManager.c:524
void DustEffectManager()
Определения DustEffectsManager.c:73
float m_TimeFromLastGroundEffect
Определения DustEffectsManager.c:33
vector GetGroundEffectPotentialPosition()
Определения DustEffectsManager.c:320
float m_CloudEffectCooldownMax
Определения DustEffectsManager.c:21
PlayerBase m_Player
Определения DustEffectsManager.c:14
bool m_CloudEffectReadFromSurface
Определения DustEffectsManager.c:26
float GetGroundEffectThreshold()
Определения DustEffectsManager.c:581
void SetGroundEffectSizeRange(float minSize, float maxSize)
Определения DustEffectsManager.c:686
void InitCeilingEffect()
Определения DustEffectsManager.c:148
void SetCloudEffectDurationMax(float duration)
Определения DustEffectsManager.c:534
const float GROUND_EFFECT_WIND_BIAS_VARIATION_RANGE
Определения DustEffectsManager.c:52
void InitGroundEffect(DustEffectsSettings dustEffectsSettings)
Определения DustEffectsManager.c:109
int IsCeilingDustEffectEnabled()
Определения DustEffectsManager.c:731
float m_Intensity
Определения DustEffectsManager.c:55
void SetCloudEffectDistance(float distance)
Определения DustEffectsManager.c:477
float m_CloudEffectDurationMin
Определения DustEffectsManager.c:23
float GetCloudEffectThreshold()
Определения DustEffectsManager.c:472
void SetGroundEffectReadFromSurfaceEnable(bool enable)
Определения DustEffectsManager.c:643
void SetCloudEffectCooldown(float cooldown)
Определения DustEffectsManager.c:507
const float CLOUD_EFFECT_SPEED_ADJUSTMENT
Определения DustEffectsManager.c:47
bool IsGroundEffectReadFromSurfaceEnable()
Определения DustEffectsManager.c:653
static string GetCeilingEffectType(int particleID)
Returns effect type paired to the particleID.
Определения DustEffectsManager.c:720
void SetGroundEffectEndPointTest(bool endPointtest)
Определения DustEffectsManager.c:633
float GetGroundEffectIntensity()
Определения DustEffectsManager.c:603
const float GROUND_EFFECT_END_TEST_DISTANCE
Определения DustEffectsManager.c:50
float m_GroundEffectLifetimeMin
Определения DustEffectsManager.c:37
void SetGroundEffectLifetimeRange(float minLifetime, float maxLifetime)
Определения DustEffectsManager.c:670
float GetGroundEffectWindWeight()
Определения DustEffectsManager.c:638
bool m_EnableCloudEffect
Определения DustEffectsManager.c:16
bool m_GroundEffectTestEndPoint
Определения DustEffectsManager.c:36
float GetGroundEffectSizeMin()
Определения DustEffectsManager.c:692
bool IsCloudEffectReadFromSurfaceEnable()
Определения DustEffectsManager.c:566
bool IsGroundEffectEnable()
Определения DustEffectsManager.c:457
const float BASE_FREQUENCY
Определения DustEffectsManager.c:62
static DustEffectManager GetDustEffectManager()
Определения DustEffectsManager.c:6
void CalculateCloudEffectPosRot(out vector cloudPositon, out vector cloudRotation)
Определения DustEffectsManager.c:387
void CreateGroundEffect()
Определения DustEffectsManager.c:246
float m_GroundEffectLifetimeMax
Определения DustEffectsManager.c:38
float ComputeCloudEffectCooldown()
Определения DustEffectsManager.c:517
bool IsCloudEffectEnable()
Определения DustEffectsManager.c:442
void Update(float deltaT)
Определения DustEffectsManager.c:160
float GetCloudEffectDistance()
Определения DustEffectsManager.c:487
void SetCloudEffectReadFromSurfaceEnable(bool enable)
Определения DustEffectsManager.c:556
static ref map< int, string > m_ParticleIDEffectPairing
Определения DustEffectsManager.c:44
static ref DustEffectManager m_Instance
Определения DustEffectsManager.c:4
float m_CloudEffectDurationMax
Определения DustEffectsManager.c:24
float m_TimeFromLastEffect
Определения DustEffectsManager.c:58
float m_ActualGroundEffectPeriod
Определения DustEffectsManager.c:60
float m_GroundEffectSizeMin
Определения DustEffectsManager.c:39
float m_TimeEffectCloud
Определения DustEffectsManager.c:69
float m_CloudEffectThreshold
Определения DustEffectsManager.c:22
static void AdjustCeilingDustEffectFrequency(string surfaceType, int particleID, inout int min, inout int max)
optional adjustment of frequency by particleID
Определения DustEffectsManager.c:706
float m_CloudEffectCooldown
Определения DustEffectsManager.c:19
void UpdateCloudEffect(float deltaT, float windStrength)
Определения DustEffectsManager.c:199
void StopCloudEffect()
Определения DustEffectsManager.c:419
void InitCloudEffect(DustEffectsSettings dustEffectsSettings)
Определения DustEffectsManager.c:127
float m_GroundEffectSizeMax
Определения DustEffectsManager.c:40
bool m_ActiveCloudEffect
Определения DustEffectsManager.c:71
float ComputeCloudEffectDuration()
Определения DustEffectsManager.c:549
float m_GroundEffectWindWeight
Определения DustEffectsManager.c:34
void UpdateActiveCloudEffect()
Определения DustEffectsManager.c:231
bool CreateCloudEffect()
Определения DustEffectsManager.c:365
float m_GroundEffectRadius
Определения DustEffectsManager.c:30
float GetGroundEffectLifetimeMin()
Определения DustEffectsManager.c:676
float m_GroundEffectThreshold
Определения DustEffectsManager.c:31
int m_CloudEffectId
Определения DustEffectsManager.c:17
void SetCloudEffectEnable(bool enable)
Определения DustEffectsManager.c:431
bool m_GroundEffectReadFromSurface
Определения DustEffectsManager.c:35
float m_CloudEffectDuration
Определения DustEffectsManager.c:25
void RegisterCeilingPair(int particleID, string effectType)
Определения DustEffectsManager.c:155
void SetCloudEffectDurationMin(float duration)
Определения DustEffectsManager.c:529
void SetGroundEffectEnable(bool enable)
Определения DustEffectsManager.c:447
void Init(PlayerBase player)
Определения DustEffectsManager.c:77
float GetCloudEffectCooldown()
Определения DustEffectsManager.c:512
void SetCeilingDustEffectEnable(bool enable)
Определения DustEffectsManager.c:736
float GetGroundEffectSizeMax()
Определения DustEffectsManager.c:697
void SetCloudEffectCooldownMax(float cooldown)
Определения DustEffectsManager.c:502
float GetCloudEffectDuration()
Определения DustEffectsManager.c:544
float GetGroundEffectRadius()
Определения DustEffectsManager.c:618
void UpdateGroundEffect(float deltaT, float windStrength)
Определения DustEffectsManager.c:184
void SetCloudEffectDuration(float duration)
Определения DustEffectsManager.c:539
const float GROUND_EFFECT_SPEED_ADJUSTMENT
Определения DustEffectsManager.c:49
float m_CloudEffectCooldownMin
Определения DustEffectsManager.c:20
float m_ActualDurationCloud
Определения DustEffectsManager.c:70
float m_CloudEffectBaseDistance
Определения DustEffectsManager.c:18
void SetGroundEffectThreshold(float threshold)
Определения DustEffectsManager.c:571
bool m_EnableGroundEffect
Определения DustEffectsManager.c:29
const float GROUND_EFFECT_WIND_BIAS_SPREAD_SCALE
Определения DustEffectsManager.c:51
override void SelectFromSurface(SurfaceInfo surfaceInfo)
Определения EffCloudDust.c:31
void SetDefault()
Определения EffCloudDust.c:8
Определения EffCloudDust.c:2
proto native Transport GetTransport()
Определения human.c:712
Определения EnMath.c:7
static const int CEILING_WOOD
Определения ParticleList.c:378
static const int NONE
Определения ParticleList.c:21
static const int INVALID
Определения ParticleList.c:20
Определения ParticleList.c:12
Entity which has the particle instance as an ObjectComponent.
Определения ParticleSource.c:128
Определения PlayerBaseClient.c:2
static int PlayOnObject(notnull Effect eff, Object obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_rotation_relative_to_world=false)
Play an Effect.
Определения EffectManager.c:70
static Effect GetEffectByID(int effect_id)
Gets the Effect with the given registered Effect ID.
Определения EffectManager.c:316
static void Stop(int effect_id)
Stops the Effect.
Определения EffectManager.c:119
static bool IsEffectExist(int effect_id)
Checks whether an Effect ID is registered in SEffectManager.
Определения EffectManager.c:303
Manager class for managing Effect (EffectParticle, EffectSound)
Определения EffectManager.c:6
proto int GetGroundEffectParticleId()
proto string GetSurfaceType()
Определения SurfaceInfo.c:9
Native class for boats - handles physics simulation.
Определения Boat.c:29
Определения Transport.c:70
static vector RotateAroundZeroDeg(vector vec, vector axis, float angle)
Rotate a vector around 0,0,0 by an angle in degrees.
Определения EnConvert.c:484
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
Определения EnConvert.c:305
proto float Normalize()
Normalizes vector. Returns length.
static const vector Up
Определения EnConvert.c:120
proto float VectorToYaw()
Returns yaw of vector.
Определения EnConvert.c:119
DayZGame GetGame()
Определения gameplay.c:636
enum ShapeType ErrorEx
static proto void SetRangeValue(int id, float value)
Set range value at the given script id.
static proto void SetValue(int id, int value)
Set value at the given script id.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
Определения EnMath.c:126
static proto float ModFloat(float x, float y)
Returns the floating-point remainder of x/y rounded towards zero.
static proto float Atan2(float y, float x)
Returns angle in radians from tangent.
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float Pow(float v, float power)
Return power of v ^ power.
static const float RAD2DEG
Определения EnMath.c:16
proto void SetParticleParm(notnull IEntity ent, int emitor, EmitorParam parameter, void value)
EmitorParam
Определения EnVisual.c:114
proto void GetParticleParm(notnull IEntity ent, int emitor, EmitorParam parameter, out void value)