16 Vec3f someOtherVelocity;
32 switch (banana->
state) {
34 temp_f2 = player->
pos[0] - banana->
pos[0];
35 temp_f14 = player->
pos[1] - banana->
pos[1];
36 temp_f16 = player->
pos[2] - banana->
pos[2];
37 temp_f12 =
sqrtf((temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16)) / 10.0f;
38 if (temp_f12 == 0.0f) {
39 banana->
pos[0] = player->
pos[0] + 0.2f;
40 banana->
pos[1] = player->
pos[1] + 0.2f;
41 banana->
pos[2] = player->
pos[2] + 0.2f;
46 banana->
pos[0] = player->
pos[0] - temp_f2;
47 banana->
pos[1] = player->
pos[1] - temp_f14 - 2.0f;
48 banana->
pos[2] = player->
pos[2] - temp_f16;
67 pad3 = pad3 - ((
f32) 30);
68 pad3 = (pad3 / 20.0f) + 0.5f;
72 temp_f0 = (player->
unk_094 * 0.75f) + 3.5f + pad3;
74 vec3f_set(someVelocity, 0, pad3, temp_f0);
76 banana->
velocity[0] = someVelocity[0];
77 banana->
velocity[1] = someVelocity[1];
78 banana->
velocity[2] = someVelocity[2];
91 banana->
flags &= ~0x1000;
115 banana->
flags &= ~0x1000;
121 someVelocity[0] = 0.0f;
122 someVelocity[1] = 0.0f;
123 someVelocity[2] = -5.0f;
125 unkX = player->
pos[0] + someVelocity[0];
126 unkY = player->
pos[1] + someVelocity[1];
127 unkZ = player->
pos[2] + someVelocity[2];
128 temp_f2 = unkX - banana->
pos[0];
129 temp_f14 = unkY - banana->
pos[1];
130 temp_f16 = unkZ - banana->
pos[2];
131 temp_f0 =
sqrtf((temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16));
132 if (temp_f0 == 0.0f) {
133 banana->
pos[0] = player->
pos[0] + 0.2f;
134 banana->
pos[1] = player->
pos[1] + 0.2f;
135 banana->
pos[2] = player->
pos[2] + 0.2f;
140 banana->
pos[0] = someVelocity[0] + (unkX - temp_f2);
141 banana->
pos[1] = unkY - temp_f14 - 2.0f;
142 banana->
pos[2] = unkZ - temp_f16;
150 temp_f2 = elderBanana->
pos[0] - banana->
pos[0];
151 temp_f14 = elderBanana->
pos[1] - banana->
pos[1];
152 temp_f16 = elderBanana->
pos[2] - banana->
pos[2];
153 temp_f12 =
sqrtf((temp_f2 * temp_f2) + (temp_f14 * temp_f14) + (temp_f16 * temp_f16)) / 5.0f;
154 if (temp_f12 == 0.0f) {
155 banana->
pos[0] = elderBanana->
pos[0] + 0.2f;
156 banana->
pos[1] = elderBanana->
pos[1] + 0.2f;
157 banana->
pos[2] = elderBanana->
pos[2] + 0.2f;
160 temp_f14 /= temp_f12;
161 temp_f16 /= temp_f12;
162 banana->
pos[0] = elderBanana->
pos[0] - temp_f2;
163 banana->
pos[1] = elderBanana->
pos[1] - temp_f14 - 2.0f;
164 banana->
pos[2] = elderBanana->
pos[2] - temp_f16;
166 var_f8 = banana->
pos[2];
177 banana->
rot[0] += 0x16C;
178 banana->
rot[1] -= 0x5B0;
179 banana->
rot[2] += 0x38E;
181 if (banana->
unk_04 == 0) {
186 banana->
flags |= 0xC000;
187 banana->
flags &= ~0x1000;
@ BANANA_ON_GROUND
Definition actor_types.h:111
@ DROPPED_BANANA
Definition actor_types.h:108
@ DESTROYED_BANANA
Definition actor_types.h:112
@ HELD_BANANA
Definition actor_types.h:107
@ BANANA_BUNCH_BANANA
Definition actor_types.h:110
@ FIRST_BANANA_BUNCH_BANANA
Definition actor_types.h:109
void destroy_destructable_actor(struct Actor *actor)
Definition actors.c:1841
void destroy_actor(struct Actor *actor)
Definition actors.c:1313
void func_802B4E30(struct Actor *arg0)
Definition actors_extended.c:972
void update_actor_banana(struct BananaActor *banana)
Update the banana actor.
Definition update.inc.c:11
s16 gCourseMinZ
Definition code_800029B0.c:93
s16 gCourseMaxZ
Definition code_800029B0.c:92
s16 gCourseMinX
Definition code_800029B0.c:87
struct Actor gActorList[ACTOR_LIST_SIZE]
Definition code_800029B0.c:148
s16 gCourseMinY
Definition code_800029B0.c:90
s16 gCourseMaxX
Definition code_800029B0.c:86
u16 check_bounding_collision(Collision *collision, f32 boundingBoxSize, f32 posX, f32 posY, f32 posZ)
Definition collision.c:1356
f32 Vec3f[3]
Definition common_structs.h:6
#define PLAYER_HUMAN
Definition defines.h:79
void func_800C9060(u8 playerId, u32 soundBits)
Definition external.c:2862
#define UNUSED
Definition macros.h:23
Player * gPlayerOne
Definition main.c:72
Player gPlayers[NUM_PLAYERS]
Definition main.c:71
struct Controller gControllers[NUM_PLAYERS]
Definition main.c:61
u16 gDemoMode
Definition main.c:172
struct Controller * gControllerOne
Definition main.c:62
void func_802B64C4(Vec3f arg0, s16 arg1)
Definition math_util.c:606
void vec3f_set(Vec3f arg0, f32 arg1, f32 arg2, f32 arg3)
Definition math_util.c:103
#define Z_TRIG
Definition os.h:393
#define SOUND_ARG_LOAD(sound_bank, byte2, byte3, sound_id)
Definition sounds.h:14
Definition actor_types.h:120
s16 state
Definition actor_types.h:124
Vec3s rot
Definition actor_types.h:127
Vec3f velocity
Definition actor_types.h:130
Collision unk30
Definition actor_types.h:131
s16 unk_04
Definition actor_types.h:123
s16 flags
Definition actor_types.h:122
Vec3f pos
Definition actor_types.h:129
f32 boundingBoxSize
Definition actor_types.h:126
Definition actor_types.h:380
Vec3s rot
Definition actor_types.h:389
Collision unk30
Definition actor_types.h:399
f32 boundingBoxSize
Definition actor_types.h:387
Vec3f pos
Definition actor_types.h:397
s16 state
Definition actor_types.h:384
Vec3f surfaceDistance
Definition common_structs.h:140
Vec3f orientationVector
Definition common_structs.h:143
u16 unk34
Definition common_structs.h:135
Definition common_structs.h:62
s16 rawStickY
Definition common_structs.h:64
s16 rawStickX
Definition common_structs.h:63
u16 buttonDepressed
Definition common_structs.h:67
Definition common_structs.h:249
s16 unk_0C0
Definition common_structs.h:299
f32 unk_094
Definition common_structs.h:284
Vec3s rotation
Definition common_structs.h:261
u16 type
Definition common_structs.h:250
s32 soundEffects
Definition common_structs.h:256
Vec3f pos
Definition common_structs.h:259
float f32
Definition ultratypes.h:34