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

Function zEntPlayer_StreakFX

src/SB/Game/zEntPlayer.cpp:3930–4062  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3928}
3929
3930static void zEntPlayer_StreakFX(xEnt* ent, F32)
3931{
3932 S32 i;
3933 S32 p;
3934 S32 cp = 0;
3935
3936 for (S32 i = 0; i < 3; i++)
3937 {
3938 for (S32 p = 0; p < 4; p++)
3939 {
3940 sStreakInfo[i][p].activated = FALSE;
3941 }
3942 }
3943
3944 if (ent->model == globals.player.model_sandy)
3945 {
3946 cp = 1;
3947 }
3948 else if (ent->model == globals.player.model_patrick)
3949 {
3950 cp = 2;
3951 }
3952
3953 if (globals.player.SlideTrackSliding & 0x1)
3954 {
3955 if (cp == 1)
3956 {
3957 if (strstr(ent->model->Anim->Single->State->Name, "Tail") != NULL)
3958 {
3959 sStreakInfo[1][0].activated = TRUE;
3960 sStreakInfo[1][1].activated = TRUE;
3961 }
3962 }
3963 else if (cp == 0 && strcmp(ent->model->Anim->Single->State->Name, "TongueJump01") == 0 ||
3964 strcmp(ent->model->Anim->Single->State->Name, "TongueJumpXtra01") == 0 ||
3965 strcmp(ent->model->Anim->Single->State->Name, "TongueDJumpApex01") == 0)
3966 {
3967 sStreakInfo[0][2].activated = TRUE;
3968 sStreakInfo[0][3].activated = TRUE;
3969 }
3970 }
3971 else if (cp == 1)
3972 {
3973 sStreakInfo[1][0].activated = TRUE;
3974 sStreakInfo[1][1].activated = TRUE;
3975 }
3976 else
3977 {
3978 sStreakInfo[cp][2].activated = TRUE;
3979 sStreakInfo[cp][3].activated = TRUE;
3980 }
3981
3982 if (globals.player.Jump_Springboard != NULL)
3983 {
3984 sStreakInfo[cp][0].activated = TRUE;
3985 sStreakInfo[cp][1].activated = TRUE;
3986 }
3987

Callers

nothing calls this directly

Calls 6

strstrFunction · 0.85
strcmpFunction · 0.85
xFXStreakStartFunction · 0.50
xFXStreakStopFunction · 0.50
iModelTagEvalFunction · 0.50
xFXStreakUpdateFunction · 0.50

Tested by

no test coverage detected