| 563 | } |
| 564 | |
| 565 | static void xEntMechMove(xEntMotion* motion, xScene* sc, F32 dt, xEntFrame* frame) |
| 566 | { |
| 567 | xEntMotionMechData* mkasst = &motion->asset->mech; |
| 568 | xEntMechData* mech = &motion->mech; |
| 569 | frame->mode = 0; |
| 570 | U32 last = 0; |
| 571 | |
| 572 | if (mech->state == 0) |
| 573 | { |
| 574 | last = xEntSldMove(motion, sc, dt, frame); |
| 575 | if (mkasst->type == 2) |
| 576 | { |
| 577 | xEntRotMove(motion, sc, dt, frame); |
| 578 | } |
| 579 | if (last != 0) |
| 580 | { |
| 581 | if (mkasst->type == 3) |
| 582 | { |
| 583 | mech->state = 1; |
| 584 | } |
| 585 | else if (mkasst->flags & 1) |
| 586 | { |
| 587 | mech->state = 2; |
| 588 | mech->ss = -mech->ss; |
| 589 | mech->sr = -mech->sr; |
| 590 | } |
| 591 | else if (mkasst->flags & 2) |
| 592 | { |
| 593 | mech->state = 6; |
| 594 | } |
| 595 | else |
| 596 | { |
| 597 | mech->state = 5; |
| 598 | } |
| 599 | } |
| 600 | } |
| 601 | else if (mech->state == 1) |
| 602 | { |
| 603 | last = xEntRotMove(motion, sc, dt, frame); |
| 604 | if (last != 0) |
| 605 | { |
| 606 | if (mkasst->type == 4) |
| 607 | { |
| 608 | mech->state = 0; |
| 609 | } |
| 610 | else if (mkasst->flags & 1) |
| 611 | { |
| 612 | mech->state = 2; |
| 613 | mech->ss = -mech->ss; |
| 614 | mech->sr = -mech->sr; |
| 615 | } |
| 616 | else if (mkasst->flags & 2) |
| 617 | { |
| 618 | mech->state = 6; |
| 619 | } |
| 620 | else if (mkasst->post_ret_delay != 0.0f) |
| 621 | { |
| 622 | mech->state = 5; |
no test coverage detected