9603 {
9604 CachedObjectsArrays.ARRAY_STRING.Clear();
9605 GetActionComponentNameList(componentIndex, CachedObjectsArrays.ARRAY_STRING, LOD.NAME_FIRE);
9606
9607 int pivot = componentIndex;
9608 int newPivot = -1;
9609 string compName;
9610 for (int i = 0; i < CachedObjectsArrays.ARRAY_STRING.Count() && newPivot == -1; i++)
9611 {
9612 compName = CachedObjectsArrays.ARRAY_STRING.
Get(i);
9614
9615 }
9616
9617 if (newPivot != -1)
9618 {
9619 pivot = newPivot;
9620
9621 }
9622
9623 vector parentTransMat[4];
9624 vector arrowTransMat[4];
9625
9626 arrow.GetTransform(arrowTransMat);
9627
9628 if (pivot == -1)
9629 {
9630 GetTransformWS(parentTransMat);
9631 }
9632 else
9633 {
9634 vector rotMatrix[3];
9635 Math3D.YawPitchRollMatrix(closeBoneRotWS * Math.RAD2DEG,rotMatrix);
9636
9637 parentTransMat[0] = rotMatrix[0];
9638 parentTransMat[1] = rotMatrix[1];
9639 parentTransMat[2] = rotMatrix[2];
9640 parentTransMat[3] = closeBonePosWS;
9641 }
9642
9643 Math3D.MatrixInvMultiply4(parentTransMat, arrowTransMat, arrowTransMat);
9644 Math3D.MatrixOrthogonalize4(arrowTransMat);
9645 arrow.SetTransform(arrowTransMat);
9646
9648
9649 #ifdef SERVER
9650
9652 if (bleedingManager)
9653 {
9654 if (!bleedingManager.AttemptAddBleedingSourceBySelection(compName))
9655 bleedingManager.AttemptAddBleedingSourceBySelection("Pelvis");
9656 }
9657 #endif
9658 }
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
BleedingSourcesManagerServer GetBleedingManagerServer()
proto string Get(int index)
Gets n-th character from string.