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

Function kill

src/SB/Game/zEntCruiseBubble.cpp:659–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

657 }
658
659 void kill(bool reset_camera, bool abortive)
660 {
661 if (abortive)
662 {
663 for (S32 i = THREAD_PLAYER; i < MAX_THREAD; ++i)
664 {
665 if (shared.state[i] != NULL)
666 {
667 (shared.state[i])->abort();
668 shared.state[i] = NULL;
669 }
670 }
671 }
672 else
673 {
674 for (S32 i = THREAD_PLAYER; i < MAX_THREAD; ++i)
675 {
676 // either STATE_INVALID or BACKUP_STATE_PLAYER, both == 0x11111111
677 set_state((thread_enum)i, STATE_INVALID);
678 }
679 }
680
681 shared.flags = 0x3;
682 zCameraEnableTracking(CO_CRUISE_BUBBLE);
683 ztalkbox::permit(0xffffffff, 0);
684 if (reset_camera)
685 {
686 zCameraEnableInput();
687 xCameraSetFOV(&globals.camera, shared.fov_default);
688 }
689
690 hide_wand();
691 hide_missle();
692 hide_hud();
693 stop_trail();
694 distort_screen(0.0f);
695 xSndSelectListenerMode(SND_LISTENER_MODE_PLAYER);
696
697 xAnimState* state = globals.player.ent.model->Anim->Single->State;
698 if (state == shared.astate.player.aim || state == shared.astate.player.fire ||
699 state == shared.astate.player.idle)
700 {
701 xAnimPlayStartTransition(
702 globals.player.ent.model->Anim,
703 shared.atran.player
704 .end); // [xAnimPlayStartTransition__FP9xAnimPlayP15xAnimTransition]
705 }
706 exit_triggers(*globals.sceneCur);
707 }
708
709 void distort_screen(F32)
710 {

Callers 4

update_playerFunction · 0.70
update_stateFunction · 0.70
resetMethod · 0.70
updateMethod · 0.70

Calls 13

zCameraEnableTrackingFunction · 0.85
zCameraEnableInputFunction · 0.85
xCameraSetFOVFunction · 0.85
hide_wandFunction · 0.85
hide_missleFunction · 0.85
hide_hudFunction · 0.85
stop_trailFunction · 0.85
distort_screenFunction · 0.85
xSndSelectListenerModeFunction · 0.85
abortMethod · 0.80
set_stateFunction · 0.70
exit_triggersFunction · 0.70

Tested by

no test coverage detected