9956 {
9957 CachedObjectsArrays.ARRAY_STRING.Clear();
9958 GetActionComponentNameList(componentIndex, CachedObjectsArrays.ARRAY_STRING, LOD.NAME_FIRE);
9959
9960 int pivot = componentIndex;
9961 int newPivot = -1;
9962 string compName;
9963 for (int i = 0; i < CachedObjectsArrays.ARRAY_STRING.Count() && newPivot == -1; i++)
9964 {
9965 compName = CachedObjectsArrays.ARRAY_STRING.
Get(i);
9967
9968 }
9969
9970 if (newPivot != -1)
9971 {
9972 pivot = newPivot;
9973
9974 }
9975
9976 vector parentTransMat[4];
9977 vector arrowTransMat[4];
9978
9979 arrow.GetTransform(arrowTransMat);
9980
9981 if (pivot == -1)
9982 {
9983 GetTransformWS(parentTransMat);
9984 }
9985 else
9986 {
9987 vector rotMatrix[3];
9988 Math3D.YawPitchRollMatrix(closeBoneRotWS * Math.RAD2DEG,rotMatrix);
9989
9990 parentTransMat[0] = rotMatrix[0];
9991 parentTransMat[1] = rotMatrix[1];
9992 parentTransMat[2] = rotMatrix[2];
9993 parentTransMat[3] = closeBonePosWS;
9994 }
9995
9996 Math3D.MatrixInvMultiply4(parentTransMat, arrowTransMat, arrowTransMat);
9997 Math3D.MatrixOrthogonalize4(arrowTransMat);
9998 arrow.SetTransform(arrowTransMat);
9999
10001
10002 #ifdef SERVER
10003
10005 if (bleedingManager)
10006 {
10007 if (!bleedingManager.AttemptAddBleedingSourceBySelection(compName))
10008 bleedingManager.AttemptAddBleedingSourceBySelection("Pelvis");
10009 }
10010 #endif
10011 }
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.