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

Function zLasso_SetGuide

src/SB/Game/zLasso.cpp:66–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void zLasso_SetGuide(xEnt* ent, xAnimState* lassoAnim)
67{
68 sCurrentGuide = NULL;
69 if (ent == NULL || lassoAnim == NULL)
70 {
71 return;
72 }
73
74 U32 guideListIdx = 0;
75 for (U32 i = 0; i < sNumGuideLists; i++, guideListIdx++)
76 {
77 if (sGuideList[i].target == ent)
78 {
79 break;
80 }
81 }
82
83 if (guideListIdx < sNumGuideLists)
84 {
85 U32 guideIdx = 0;
86 for (U32 i = 0; i < sGuideList[guideListIdx].numGuides; i++, guideIdx++)
87 {
88 if (sGuideList[guideListIdx].guide[i].lassoAnim == lassoAnim)
89 {
90 break;
91 }
92 }
93
94 if (guideIdx < sGuideList[guideListIdx].numGuides)
95 {
96 sCurrentGuide = &sGuideList[guideListIdx].guide[guideIdx];
97 }
98 }
99
100 if (sCurrentGuide == NULL)
101 {
102 sCurrentGuide = &sGuideList->guide[0];
103 }
104}
105
106void zLasso_InterpToGuide(zLasso* lasso)
107{

Callers 3

zEntPlayer_LassoNotifyFunction · 0.70
LassoStartCBFunction · 0.70
LassoStopCBFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected