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

Method detach_update

src/SB/Game/zEntPlayerBungeeState.cpp:1018–1047  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1016 }
1017
1018 S32 hanging_state_type::detach_update(xScene& scene, F32& dt)
1019 {
1020 xSphere sphere;
1021
1022 last_hook_loc = shared.hook_loc;
1023 update_hook_loc();
1024
1025 stick_loc.x = stick_loc.y = 0.0f; // Chained assignment required for match
1026 last_loc = loc;
1027
1028 xVec3 deltaVel = loc.normal() * -h.detach.accel;
1029 vel += deltaVel * dt;
1030 loc += deltaVel * dt * dt + vel * dt;
1031
1032 update_animation(dt);
1033 update_detach_camera(dt);
1034
1035 globals.player.ent.bound.sph = player_bound();
1036
1037 update_sound(dt);
1038 update_blur(dt);
1039
1040 if (loc.y >= 0.0f || loc.length2() <= 0.1f)
1041 {
1042 play_sound(SOUND_DETACH, 0.0f);
1043 return -1;
1044 }
1045
1046 return 1;
1047 }
1048
1049 void hanging_state_type::update_detach_camera(F32 dt)
1050 {

Callers

nothing calls this directly

Calls 9

update_hook_locFunction · 0.85
update_detach_cameraFunction · 0.85
player_boundFunction · 0.85
update_soundFunction · 0.85
update_blurFunction · 0.85
normalMethod · 0.80
play_soundFunction · 0.70
update_animationFunction · 0.50
length2Method · 0.45

Tested by

no test coverage detected