| 717 | } |
| 718 | |
| 719 | void update_player(xScene& s, F32 dt) |
| 720 | { |
| 721 | // register usage and stack scheduling differing |
| 722 | xVec3 pre_update_loc = cruise_bubble::get_player_loc(); |
| 723 | xVec3 drive_motion; |
| 724 | |
| 725 | bool stop = zEntPlayer_MinimalUpdate(&globals.player.ent, &s, dt, drive_motion) || |
| 726 | globals.player.Health < shared.player_health; |
| 727 | |
| 728 | if (!stop) |
| 729 | { |
| 730 | shared.player_motion += |
| 731 | cruise_bubble::get_player_loc() - pre_update_loc - drive_motion; |
| 732 | |
| 733 | if (shared.player_motion.length2() > 0.25f) |
| 734 | { |
| 735 | stop = true; |
| 736 | } |
| 737 | } |
| 738 | |
| 739 | if (stop) |
| 740 | { |
| 741 | cruise_bubble::kill(true, false); |
| 742 | } |
| 743 | } |
| 744 | |
| 745 | xVec3& get_player_loc() |
| 746 | { |
no test coverage detected