| 1080 | } |
| 1081 | |
| 1082 | void xEntMotionToMatrix(xEnt* ent, xEntFrame* frame) |
| 1083 | { |
| 1084 | if (frame->mode & 0x1000) |
| 1085 | { |
| 1086 | xEntRotationToMatrix(frame); |
| 1087 | } |
| 1088 | |
| 1089 | if (frame->mode & 0x2) |
| 1090 | { |
| 1091 | if (frame->mode & 0x800) |
| 1092 | { |
| 1093 | xMat3x3RMulVec(&frame->dpos, &frame->mat, &frame->dpos); |
| 1094 | } |
| 1095 | |
| 1096 | xEntAddToPos(ent, &frame->dpos); |
| 1097 | } |
| 1098 | |
| 1099 | if (frame->mode & 0x8) |
| 1100 | { |
| 1101 | if (frame->mode & 0x800) |
| 1102 | { |
| 1103 | xMat3x3RMulVec(&frame->dvel, &frame->mat, &frame->dvel); |
| 1104 | } |
| 1105 | |
| 1106 | xVec3AddTo(&frame->vel, &frame->dvel); |
| 1107 | } |
| 1108 | |
| 1109 | if (!(frame->mode & 0x1000)) |
| 1110 | { |
| 1111 | xEntRotationToMatrix(frame); |
| 1112 | } |
| 1113 | } |
| 1114 | |
| 1115 | void xEntMove(xEnt* ent, xScene* sc, F32 dt) |
| 1116 | { |
no test coverage detected