mirror of https://github.com/sm64pc/sm64pc.git
Merge pull request #123 from HeavenVolkoff/wf_no_drawing_distance
Fix Whomp, PiranhaPlant and Walking Penguin not appearing from a distance
This commit is contained in:
commit
6c4bf44d93
|
@ -328,7 +328,7 @@ void (*TablePiranhaPlantActions[])(void) = {
|
||||||
*/
|
*/
|
||||||
void bhv_piranha_plant_loop(void) {
|
void bhv_piranha_plant_loop(void) {
|
||||||
cur_obj_call_action_function(TablePiranhaPlantActions);
|
cur_obj_call_action_function(TablePiranhaPlantActions);
|
||||||
|
#ifndef NODRAWINGDISTANCE
|
||||||
// In WF, hide all Piranha Plants once high enough up.
|
// In WF, hide all Piranha Plants once high enough up.
|
||||||
if (gCurrLevelNum == LEVEL_WF) {
|
if (gCurrLevelNum == LEVEL_WF) {
|
||||||
if (gMarioObject->oPosY > 3400.0f)
|
if (gMarioObject->oPosY > 3400.0f)
|
||||||
|
@ -336,5 +336,6 @@ void bhv_piranha_plant_loop(void) {
|
||||||
else
|
else
|
||||||
cur_obj_unhide();
|
cur_obj_unhide();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
o->oInteractStatus = 0;
|
o->oInteractStatus = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,9 @@ void bhv_sl_walking_penguin_loop(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_obj_move_standard(-78);
|
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);
|
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.
|
// Adjust the position to get a point better lined up with the visual model, for stopping the wind.
|
||||||
|
|
|
@ -246,10 +246,14 @@ void bhv_whomp_loop(void) {
|
||||||
cur_obj_call_action_function(sWhompActions);
|
cur_obj_call_action_function(sWhompActions);
|
||||||
cur_obj_move_standard(-20);
|
cur_obj_move_standard(-20);
|
||||||
if (o->oAction != 9) {
|
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)
|
if (o->oBehParams2ndByte != 0)
|
||||||
cur_obj_hide_if_mario_far_away_y(2000.0f);
|
cur_obj_hide_if_mario_far_away_y(2000.0f);
|
||||||
else
|
else
|
||||||
cur_obj_hide_if_mario_far_away_y(1000.0f);
|
cur_obj_hide_if_mario_far_away_y(1000.0f);
|
||||||
|
#endif
|
||||||
load_object_collision_model();
|
load_object_collision_model();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue