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

◆ CreateSoundForAnimationSource()

EffectSound Car::CreateSoundForAnimationSource ( string animSource)
inlineprotected

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

1459 {
1460 vector position = vector.Zero;
1461 int pivotIndex = -1;
1462
1463 string selectionName = GetSelectionFromAnimSource(animSource);
1464 if (selectionName != "")
1465 {
1466 position = GetSelectionBasePositionLS(selectionName);
1467
1468 int level = GetViewGeometryLevel();
1469
1470 array<int> pivots = new array<int>();
1471
1472 pivots.Clear();
1473 GetBonePivotsForAnimationSource(level, animSource, pivots);
1474
1475 if (pivots.Count())
1476 {
1477 pivotIndex = pivots[0];
1478 }
1479 }
1480
1481 WaveKind waveKind = WaveKind.WAVEEFFECTEX;
1482
1483 EffectSound sound = new EffectSound();
1484
1485 PlayerBase player;
1486 if (Class.CastTo(player, g_Game.GetPlayer()))
1487 {
1488 if (player.IsCameraInsideVehicle())
1489 {
1490 waveKind = WaveKind.WAVEEFFECT;
1491 }
1492 }
1493
1494 sound.SetAutodestroy(true);
1495 sound.SetParent(this, pivotIndex);
1496 sound.SetPosition(ModelToWorld(position));
1497 sound.SetLocalPosition(position);
1498 sound.SetSoundWaveKind(waveKind);
1499
1500 return sound;
1501 }
DayZGame g_Game
Определения DayZGame.c:4074
vector position
Определения DustKickupEffects.c:20
WaveKind
Определения Sound.c:2
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Определения EffectSound.c:607
void SetSoundWaveKind(WaveKind wave_kind)
Set WaveKind for the sound.
Определения EffectSound.c:788
override void SetParent(Object parent_obj, int pivot)
Set parent for the sound to follow.
Определения EffectSound.c:658
static const vector Zero
Определения EnConvert.c:123

Перекрестные ссылки Class::CastTo(), g_Game, position, EffectSound::SetAutodestroy(), EffectSound::SetParent(), EffectSound::SetSoundWaveKind() и vector::Zero.