| 1014 | } |
| 1015 | |
| 1016 | void G_BoneOrientationsForClass( int NPC_class, const char *boneName, Eorientations *oUp, Eorientations *oRt, Eorientations *oFwd ) |
| 1017 | { |
| 1018 | //defaults |
| 1019 | *oUp = POSITIVE_X; |
| 1020 | *oRt = NEGATIVE_Y; |
| 1021 | *oFwd = NEGATIVE_Z; |
| 1022 | //switch off class |
| 1023 | switch ( NPC_class ) |
| 1024 | { |
| 1025 | case CLASS_RANCOR: |
| 1026 | *oUp = NEGATIVE_X; |
| 1027 | *oRt = POSITIVE_Y; |
| 1028 | *oFwd = POSITIVE_Z; |
| 1029 | //*oUp = testAxes[0]; |
| 1030 | //*oRt = testAxes[1]; |
| 1031 | //*oFwd = testAxes[2]; |
| 1032 | break; |
| 1033 | case CLASS_ROCKETTROOPER: |
| 1034 | case CLASS_HAZARD_TROOPER: |
| 1035 | //Root is: |
| 1036 | //*oUp = POSITIVE_Z; |
| 1037 | //*oRt = NEGATIVE_X; |
| 1038 | //*oFwd = NEGATIVE_Y; |
| 1039 | if ( Q_stricmp( "pelvis", boneName ) == 0 ) |
| 1040 | {//child of root |
| 1041 | //in ModView: |
| 1042 | //*oUp = NEGATIVE_X; |
| 1043 | //*oRt = NEGATIVE_Z; |
| 1044 | //*oFwd = NEGATIVE_Y; |
| 1045 | //actual, when differences with root are accounted for: |
| 1046 | *oUp = POSITIVE_Z; |
| 1047 | *oRt = NEGATIVE_X; |
| 1048 | *oFwd = NEGATIVE_Y; |
| 1049 | } |
| 1050 | else |
| 1051 | {//all the rest are the same, children of root (not pelvis) |
| 1052 | //in ModView: |
| 1053 | //*oUp = POSITIVE_X; |
| 1054 | //*oRt = POSITIVE_Y; |
| 1055 | //*oFwd = POSITIVE_Z; |
| 1056 | //actual, when differences with root are accounted for: |
| 1057 | //*oUp = POSITIVE_Z; |
| 1058 | //*oRt = NEGATIVE_Y; |
| 1059 | //*oFwd = NEGATIVE_X; |
| 1060 | *oUp = NEGATIVE_X; |
| 1061 | *oRt = POSITIVE_Y; |
| 1062 | *oFwd = POSITIVE_Z; |
| 1063 | } |
| 1064 | break; |
| 1065 | case CLASS_SABER_DROID: |
| 1066 | if ( Q_stricmp( "pelvis", boneName ) == 0 |
| 1067 | || Q_stricmp( "thoracic", boneName ) == 0 ) |
| 1068 | { |
| 1069 | *oUp = NEGATIVE_X; |
| 1070 | *oRt = NEGATIVE_Z; |
| 1071 | *oFwd = NEGATIVE_Y; |
| 1072 | } |
| 1073 | else |
no test coverage detected