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

◆ CreateSoundForAnimationSource()

EffectSound Car::CreateSoundForAnimationSource ( string animSource)
inlineprotected

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

1678 {
1679 vector position = vector.Zero;
1680 int pivotIndex = -1;
1681
1682 string selectionName = GetSelectionFromAnimSource(animSource);
1683 if (selectionName != "")
1684 {
1685 position = GetSelectionBasePositionLS(selectionName);
1686
1687 int level = GetViewGeometryLevel();
1688
1689 array<int> pivots = new array<int>();
1690
1691 pivots.Clear();
1692 GetBonePivotsForAnimationSource(level, animSource, pivots);
1693
1694 if (pivots.Count())
1695 {
1696 pivotIndex = pivots[0];
1697 }
1698 }
1699
1700 WaveKind waveKind = WaveKind.WAVEEFFECTEX;
1701
1702 EffectSound sound = new EffectSound();
1703
1704 PlayerBase player;
1705 if (Class.CastTo(player, g_Game.GetPlayer()))
1706 {
1707 if (player.IsCameraInsideVehicle())
1708 {
1709 waveKind = WaveKind.WAVEEFFECT;
1710 }
1711 }
1712
1713 sound.SetAutodestroy(true);
1714 sound.SetParent(this, pivotIndex);
1715 sound.SetPosition(ModelToWorld(position));
1716 sound.SetLocalPosition(position);
1717 sound.SetSoundWaveKind(waveKind);
1718
1719 return sound;
1720 }
DayZGame g_Game
Определения DayZGame.c:3942
WaveKind
Определения Sound.c:2
string GetSelectionFromAnimSource(string animSource)
Определения CarScript.c:2651
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Определения EffectSound.c:603
void SetSoundWaveKind(WaveKind wave_kind)
Set WaveKind for the sound.
Определения EffectSound.c:784
override void SetParent(Object parent_obj, int pivot)
Set parent for the sound to follow.
Определения EffectSound.c:654

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

Используется в HandleDoorsSound() и HandleSeatAdjustmentSound().