| 363 | } |
| 364 | |
| 365 | void xEntMPGetNext(xEntMotion* motion, xMovePoint* prev, xScene* sc) |
| 366 | { |
| 367 | xEntMPData* mp = &motion->mp; |
| 368 | xVec3 tempdir; |
| 369 | xMat3x3 mat; |
| 370 | |
| 371 | mp->spl = NULL; |
| 372 | mp->curdist = 0.0f; |
| 373 | mp->dist = xMovePointGetNext(mp->src, prev, &mp->dest, &tempdir); |
| 374 | |
| 375 | if (mp->dest == mp->src) |
| 376 | { |
| 377 | xEntMotionStop(motion); |
| 378 | } |
| 379 | else if (mp->dest == 0) |
| 380 | { |
| 381 | xEntMotionStop(motion); |
| 382 | } |
| 383 | else |
| 384 | { |
| 385 | if (motion->asset->flags & 1) |
| 386 | { |
| 387 | xQuatFromMat(&mp->aquat, (xMat3x3*)(motion->owner->model->Mat)); |
| 388 | xVec3Inv(&tempdir, &tempdir); |
| 389 | xMat3x3LookVec(&mat, &tempdir); |
| 390 | xQuatFromMat(&mp->bquat, &mat); |
| 391 | } |
| 392 | if (mp->dest->spl != 0) |
| 393 | { |
| 394 | mp->spl = mp->dest->spl; |
| 395 | while (mp->dest->asset->bezIndex != 0) |
| 396 | { |
| 397 | mp->dest = mp->dest->nodes[0]; |
| 398 | } |
| 399 | mp->dist = xSpline3_ArcTotal(mp->spl); |
| 400 | } |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | U32 xQuatEquals(const xQuat* a, const xQuat* b); // Should be linked weakly |
| 405 |
no test coverage detected