31 height = shell->
pos[0];
39 switch (shell->
state) {
47 shell->
pos[0] = player->
pos[0] + somePosVel[0];
48 pad2 = player->
pos[1] - somePosVel[1];
49 shell->
pos[2] = player->
pos[2] + somePosVel[2];
52 if ((z < 5.0f) && (z > -5.0f)) {
64 var_f2 = player->
unk_094 * 1.2f;
68 somePosVel[2] = -var_f2;
113 if (shell->
state == 2) {
116 var_f2 = player->
unk_094 * 1.2f;
118 somePosVel[0] = 0.0f;
119 somePosVel[1] = 0.0f;
120 somePosVel[2] = var_f2;
130 shell->
pos[0] = player->
pos[0] + somePosVel[0];
131 shell->
pos[1] = player->
pos[1] + somePosVel[1];
132 shell->
pos[2] = player->
pos[2] + somePosVel[2];
139 shell->
flags &= ~0x1000;
146 somePos2[0] = shell->
pos[0];
147 somePos2[1] = shell->
pos[1];
148 somePos2[2] = shell->
pos[2];
153 somePos2[1], somePos2[2]);
158 shell->
flags |= 0x80;
162 player = &
gPlayers[shell->playerId];
168 somePosVel[0] =
sins(shell->rotAngle) * 8.0f;
170 somePosVel[2] =
coss(shell->rotAngle) * 8.0f;
172 somePos2[0] = shell->
pos[0];
173 somePos2[1] = shell->
pos[1];
174 somePos2[2] = shell->
pos[2];
175 shell->
pos[0] = player->
pos[0] + somePosVel[0];
176 shell->
pos[1] = player->
pos[1] + somePosVel[1];
177 shell->
pos[2] = player->
pos[2] + somePosVel[2];
179 somePos2[1], somePos2[2]);
189 shell->rotAngle += 0x5B0;
190 shell->someTimer -= 1;
192 if (shell->someTimer == 0) {
@ ACTOR_TRIPLE_GREEN_SHELL
Definition actor_types.h:59
@ MOVING_SHELL
Definition actor_types.h:95
@ HELD_SHELL
Definition actor_types.h:93
@ RELEASED_SHELL
Definition actor_types.h:94
@ GREEN_SHELL_HIT_A_RACER
Definition actor_types.h:98
@ TRIPLE_GREEN_SHELL
Definition actor_types.h:97
void destroy_destructable_actor(struct Actor *actor)
Definition actors.c:1841
void destroy_actor(struct Actor *actor)
Definition actors.c:1313
void copy_collision(Collision *src, Collision *dest)
Definition actors_extended.c:19
void func_802B4E30(struct Actor *arg0)
Definition actors_extended.c:972
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
s32 add_green_shell_in_unexpired_actor_list(s32 actorIndex)
Definition code_80005FD0.c:3277
void shell_collision(Collision *collision, Vec3f velocity)
Definition collision.c:594
f32 calculate_surface_height(f32 x, f32 y, f32 z, u16 index)
Definition collision.c:527
u16 actor_terrain_collision(Collision *collision, f32 boundingBoxSize, f32 newX, f32 newY, f32 newZ, f32 oldX, f32 oldY, f32 oldZ)
Definition collision.c:1236
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
void func_800C90F4(u8 playerId, u32 soundBits)
Definition external.c:2875
void func_800C98B8(Vec3f position, Vec3f velocity, u32 soundBits)
Definition external.c:3027
void update_actor_green_shell(struct ShellActor *shell)
Updates the green shell actor.
Definition update.inc.c:12
#define UNUSED
Definition macros.h:23
Player gPlayers[NUM_PLAYERS]
Definition main.c:71
struct Controller gControllers[NUM_PLAYERS]
Definition main.c:61
f32 sins(u16 arg0)
Definition math_util.c:1077
void func_802B64C4(Vec3f arg0, s16 arg1)
Definition math_util.c:606
void mtxf_translate_vec3f_mat3(Vec3f pos, Mat3 mat)
Definition math_util.c:574
f32 coss(u16 arg0)
Definition math_util.c:1081
#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
Vec3f velocity
Definition actor_types.h:130
Collision unk30
Definition actor_types.h:131
s16 flags
Definition actor_types.h:122
Vec3f pos
Definition actor_types.h:129
f32 boundingBoxSize
Definition actor_types.h:126
Vec3f surfaceDistance
Definition common_structs.h:140
u16 meshIndexZX
Definition common_structs.h:139
Definition common_structs.h:62
s16 rawStickY
Definition common_structs.h:64
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
Mat3 orientationMatrix
Definition common_structs.h:326
u16 characterId
Definition common_structs.h:354
Vec3s rotation
Definition common_structs.h:261
Collision collision
Definition common_structs.h:324
f32 boundingBoxSize
Definition common_structs.h:274
u16 type
Definition common_structs.h:250
Vec3f pos
Definition common_structs.h:259
Definition actor_types.h:304
s16 rotAngle
Definition actor_types.h:320
s16 rotVelocity
Definition actor_types.h:318
s16 flags
Definition actor_types.h:306
f32 boundingBoxSize
Definition actor_types.h:317
s16 state
Definition actor_types.h:315
s16 playerId
Definition actor_types.h:324
Vec3f velocity
Definition actor_types.h:327
s16 parentIndex
Definition actor_types.h:310
Vec3f pos
Definition actor_types.h:326
Collision unk30
Definition actor_types.h:328
s16 someTimer
Definition actor_types.h:311
Definition actor_types.h:288
s16 rotVelocity
Definition actor_types.h:295
s16 type
Definition actor_types.h:289
float f32
Definition ultratypes.h:34