From aba9a57e148ad550100f0ef827e1b17b0cc92492 Mon Sep 17 00:00:00 2001 From: Heaven Volkoff Date: Sat, 16 May 2020 02:59:29 -0300 Subject: [PATCH 1/4] Fix Whomp and PiranhaPlant not appearing from a distance in WF --- src/game/behaviors/piranha_plant.inc.c | 2 ++ src/game/behaviors/whomp.inc.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/game/behaviors/piranha_plant.inc.c b/src/game/behaviors/piranha_plant.inc.c index e8abe089..7677e3c9 100644 --- a/src/game/behaviors/piranha_plant.inc.c +++ b/src/game/behaviors/piranha_plant.inc.c @@ -329,6 +329,7 @@ void (*TablePiranhaPlantActions[])(void) = { void bhv_piranha_plant_loop(void) { cur_obj_call_action_function(TablePiranhaPlantActions); + #ifndef NODRAWINGDISTANCE // In WF, hide all Piranha Plants once high enough up. if (gCurrLevelNum == LEVEL_WF) { if (gMarioObject->oPosY > 3400.0f) @@ -336,5 +337,6 @@ void bhv_piranha_plant_loop(void) { else cur_obj_unhide(); } + #endif o->oInteractStatus = 0; } diff --git a/src/game/behaviors/whomp.inc.c b/src/game/behaviors/whomp.inc.c index c9ebca0a..28f1c4c8 100644 --- a/src/game/behaviors/whomp.inc.c +++ b/src/game/behaviors/whomp.inc.c @@ -246,10 +246,14 @@ void bhv_whomp_loop(void) { cur_obj_call_action_function(sWhompActions); cur_obj_move_standard(-20); if (o->oAction != 9) { + #ifndef NODRAWINGDISTANCE + // o->oBehParams2ndByte here seems to be a flag + // indicating whether this is a normal or king whomp if (o->oBehParams2ndByte != 0) cur_obj_hide_if_mario_far_away_y(2000.0f); else cur_obj_hide_if_mario_far_away_y(1000.0f); + #endif load_object_collision_model(); } } From fd9909269d8c99f452e683d3e9f5c5558a6dcd4d Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Sat, 16 May 2020 10:19:58 -0300 Subject: [PATCH 2/4] Remove newline in nodrawdistance define --- src/game/behaviors/piranha_plant.inc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/game/behaviors/piranha_plant.inc.c b/src/game/behaviors/piranha_plant.inc.c index 7677e3c9..328f4518 100644 --- a/src/game/behaviors/piranha_plant.inc.c +++ b/src/game/behaviors/piranha_plant.inc.c @@ -328,7 +328,6 @@ void (*TablePiranhaPlantActions[])(void) = { */ void bhv_piranha_plant_loop(void) { cur_obj_call_action_function(TablePiranhaPlantActions); - #ifndef NODRAWINGDISTANCE // In WF, hide all Piranha Plants once high enough up. if (gCurrLevelNum == LEVEL_WF) { From 6736bd7e9ceeb260d4530c2c962160574a076821 Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Sat, 16 May 2020 10:23:32 -0300 Subject: [PATCH 3/4] Fix SL walking penguin for nodrawdistance --- src/game/behaviors/sl_walking_penguin.inc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/behaviors/sl_walking_penguin.inc.c b/src/game/behaviors/sl_walking_penguin.inc.c index f5b60a8a..59428acb 100644 --- a/src/game/behaviors/sl_walking_penguin.inc.c +++ b/src/game/behaviors/sl_walking_penguin.inc.c @@ -97,7 +97,9 @@ void bhv_sl_walking_penguin_loop(void) { } cur_obj_move_standard(-78); - if (!cur_obj_hide_if_mario_far_away_y(1000.0f)) +#ifndef NODRAWINGDISTANCE + if (!cur_obj_hide_if_mario_far_away_y(1000.0f)) +#endif play_penguin_walking_sound(PENGUIN_WALK_BIG); // Adjust the position to get a point better lined up with the visual model, for stopping the wind. From a5d4b22606e16f9656541e5d0c8834af97fdf1a5 Mon Sep 17 00:00:00 2001 From: wabberz <22555393+wabberz@users.noreply.github.com> Date: Sat, 16 May 2020 20:33:41 +0200 Subject: [PATCH 4/4] Update whomp.inc.c --- src/game/behaviors/whomp.inc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/behaviors/whomp.inc.c b/src/game/behaviors/whomp.inc.c index 28f1c4c8..c7c39241 100644 --- a/src/game/behaviors/whomp.inc.c +++ b/src/game/behaviors/whomp.inc.c @@ -246,14 +246,14 @@ void bhv_whomp_loop(void) { cur_obj_call_action_function(sWhompActions); cur_obj_move_standard(-20); if (o->oAction != 9) { - #ifndef NODRAWINGDISTANCE +#ifndef NODRAWINGDISTANCE // o->oBehParams2ndByte here seems to be a flag // indicating whether this is a normal or king whomp if (o->oBehParams2ndByte != 0) cur_obj_hide_if_mario_far_away_y(2000.0f); else cur_obj_hide_if_mario_far_away_y(1000.0f); - #endif +#endif load_object_collision_model(); } }