1678 {
1679 vector position = vector.Zero;
1680 int pivotIndex = -1;
1681
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
1701
1702 EffectSound sound = new EffectSound();
1703
1704 PlayerBase player;
1705 if (Class.CastTo(player,
g_Game.GetPlayer()))
1706 {
1707 if (player.IsCameraInsideVehicle())
1708 {
1710 }
1711 }
1712
1715 sound.SetPosition(ModelToWorld(position));
1716 sound.SetLocalPosition(position);
1718
1719 return sound;
1720 }
string GetSelectionFromAnimSource(string animSource)
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
void SetSoundWaveKind(WaveKind wave_kind)
Set WaveKind for the sound.
override void SetParent(Object parent_obj, int pivot)
Set parent for the sound to follow.