summaryrefslogtreecommitdiff
path: root/src/actors/green_shell/update.inc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/actors/green_shell/update.inc.c')
-rw-r--r--src/actors/green_shell/update.inc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/actors/green_shell/update.inc.c b/src/actors/green_shell/update.inc.c
index 157895844..546baee89 100644
--- a/src/actors/green_shell/update.inc.c
+++ b/src/actors/green_shell/update.inc.c
@@ -74,7 +74,7 @@ void update_actor_green_shell(struct ShellActor* shell) {
func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04));
func_800C90F4(shell->playerId,
(player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00));
- add_green_shell_in_unexpired_actor_list((struct Actor*) shell - gActorList);
+ add_green_shell_in_unexpired_actor_list(m_FindActorIndex(shell));
return;
} else {
shell->state = 1;
@@ -97,7 +97,7 @@ void update_actor_green_shell(struct ShellActor* shell) {
func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04));
func_800C90F4(shell->playerId,
(player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00));
- add_green_shell_in_unexpired_actor_list((struct Actor*) shell - gActorList);
+ add_green_shell_in_unexpired_actor_list(m_FindActorIndex(shell));
}
} else {
shell->rotAngle += 0xE38;
@@ -107,7 +107,7 @@ void update_actor_green_shell(struct ShellActor* shell) {
func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04));
func_800C90F4(shell->playerId,
(player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00));
- add_green_shell_in_unexpired_actor_list((struct Actor*) shell - gActorList);
+ add_green_shell_in_unexpired_actor_list(m_FindActorIndex(shell));
}
}
if (shell->state == 2) {
@@ -160,7 +160,7 @@ void update_actor_green_shell(struct ShellActor* shell) {
break;
case TRIPLE_GREEN_SHELL:
player = &gPlayers[shell->playerId];
- parent = (TripleShellParent*) &gActorList[shell->parentIndex];
+ parent = (TripleShellParent*) GET_ACTOR(shell->parentIndex);
if (parent->type != ACTOR_TRIPLE_GREEN_SHELL) {
destroy_destructable_actor((struct Actor*) shell);
} else {