MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / update_player

Function update_player

src/SB/Game/zEntCruiseBubble.cpp:719–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

updateMethod · 0.70

Calls 4

get_player_locFunction · 0.85
zEntPlayer_MinimalUpdateFunction · 0.85
killFunction · 0.70
length2Method · 0.45

Tested by

no test coverage detected