1459 {
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
1482
1483 EffectSound sound = new EffectSound();
1484
1485 PlayerBase player;
1486 if (Class.CastTo(player,
g_Game.GetPlayer()))
1487 {
1488 if (player.IsCameraInsideVehicle())
1489 {
1491 }
1492 }
1493
1496 sound.SetPosition(ModelToWorld(
position));
1499
1500 return sound;
1501 }
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.