sm64pc/src/game/behaviors/koopa_shell_underwater.inc.c

39 lines
1012 B
C
Raw Permalink Normal View History

2019-08-25 04:46:40 +00:00
// koopa_shell_underwater.c.inc
struct ObjectHitbox sKoopaShellUnderwaterHitbox = {
/* interactType: */ INTERACT_GRABBABLE,
/* downOffset: */ 0,
/* damageOrCoinValue: */ 0,
/* health: */ 1,
/* numLootCoins: */ 0,
/* radius: */ 80,
/* height: */ 50,
/* hurtboxRadius: */ 0,
/* hurtboxHeight: */ 0,
};
2020-03-02 03:42:52 +00:00
void set_koopa_shell_underwater_hitbox(void) {
obj_set_hitbox(o, &sKoopaShellUnderwaterHitbox);
2019-08-25 04:46:40 +00:00
}
void bhv_koopa_shell_underwater_loop(void) {
switch (o->oHeldState) {
case HELD_FREE:
2020-03-02 03:42:52 +00:00
set_koopa_shell_underwater_hitbox();
2019-08-25 04:46:40 +00:00
break;
case HELD_HELD:
2020-03-02 03:42:52 +00:00
cur_obj_unrender_and_reset_state(-1, 0);
2019-08-25 04:46:40 +00:00
break;
case HELD_THROWN:
case HELD_DROPPED:
2020-03-02 03:42:52 +00:00
obj_mark_for_deletion(o);
spawn_mist_particles();
2019-08-25 04:46:40 +00:00
break;
}
if (o->oInteractStatus & INT_STATUS_STOP_RIDING) {
2020-03-02 03:42:52 +00:00
obj_mark_for_deletion(o);
spawn_mist_particles();
2019-08-25 04:46:40 +00:00
}
o->oInteractStatus = 0;
}