From 3cd9b60f87d7592b645fb1f7481603f5e5a7bb2e Mon Sep 17 00:00:00 2001 From: David Joslin Date: Thu, 26 Oct 2023 16:53:50 -0700 Subject: [PATCH] Force hidden 1up triggers to be invisible and E_MODEL_NONE --- data/behavior_data.c | 3 +++ src/game/behavior_actions.h | 1 + src/game/behaviors/mushroom_1up.inc.c | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/data/behavior_data.c b/data/behavior_data.c index f107e49a..8dd2d314 100644 --- a/data/behavior_data.c +++ b/data/behavior_data.c @@ -4984,6 +4984,7 @@ const BehaviorScript bhvHidden1upTrigger[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), SET_HITBOX(/*Radius*/ 100, /*Height*/ 100), SET_INT(oIntangibleTimer, 0), + CALL_NATIVE(bhv_1up_trigger_init), BEGIN_LOOP(), CALL_NATIVE(bhv_1up_hidden_trigger_loop), END_LOOP(), @@ -5009,6 +5010,7 @@ const BehaviorScript bhvHidden1upInPoleTrigger[] = { OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), SET_HITBOX(/*Radius*/ 100, /*Height*/ 100), SET_INT(oIntangibleTimer, 0), + CALL_NATIVE(bhv_1up_trigger_init), BEGIN_LOOP(), CALL_NATIVE(bhv_1up_hidden_in_pole_trigger_loop), END_LOOP(), @@ -5018,6 +5020,7 @@ const BehaviorScript bhvHidden1upInPoleSpawner[] = { BEGIN(OBJ_LIST_LEVEL), ID(id_bhvHidden1upInPoleSpawner), OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE), + CALL_NATIVE(bhv_1up_trigger_init), BEGIN_LOOP(), CALL_NATIVE(bhv_1up_hidden_in_pole_spawner_loop), END_LOOP(), diff --git a/src/game/behavior_actions.h b/src/game/behavior_actions.h index 5e79ef4a..305e929b 100644 --- a/src/game/behavior_actions.h +++ b/src/game/behavior_actions.h @@ -409,6 +409,7 @@ void bhv_hidden_star_trigger_loop(void); void bhv_ttm_rolling_log_init(void); void bhv_rolling_log_loop(void); void bhv_lll_rolling_log_init(void); +void bhv_1up_trigger_init(void); void bhv_1up_common_init(void); void bhv_1up_walking_loop(void); void bhv_1up_running_away_loop(void); diff --git a/src/game/behaviors/mushroom_1up.inc.c b/src/game/behaviors/mushroom_1up.inc.c index 3e4c1d2c..210c1592 100644 --- a/src/game/behaviors/mushroom_1up.inc.c +++ b/src/game/behaviors/mushroom_1up.inc.c @@ -19,6 +19,11 @@ void bhv_1up_interact(void) { } } +void bhv_1up_trigger_init(void) { + obj_set_model_extended(o, E_MODEL_NONE); + cur_obj_hide(); +} + void bhv_1up_common_init(void) { o->oMoveAnglePitch = -0x4000; o->oGravity = 3.0f;