several fixes and improvements
This commit is contained in:
parent
5492d2ee74
commit
5072b85ed6
|
@ -8,11 +8,15 @@
|
|||
void bub_spawner_act_0(void) {
|
||||
s32 i;
|
||||
s32 sp18 = o->oBirdChirpChirpUnkF4;
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
if (o->oDistanceToMario < 1500.0f) {
|
||||
#endif
|
||||
for (i = 0; i < sp18; i++)
|
||||
spawn_object(o, MODEL_BUB, bhvBub);
|
||||
o->oAction = 1;
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void bub_spawner_act_1(void) {
|
||||
|
|
|
@ -108,7 +108,5 @@ void bhv_butterfly_loop(void) {
|
|||
break;
|
||||
}
|
||||
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
set_object_visibility(o, 3000);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
|
||||
static void fire_spitter_act_idle(void) {
|
||||
approach_f32_ptr(&o->header.gfx.scale[0], 0.2f, 0.002f);
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
if (o->oTimer > 150 && o->oDistanceToMario < 800.0f && !(o->oMoveFlags & 0x00000078)) {
|
||||
#endif
|
||||
o->oAction = FIRE_SPITTER_ACT_SPIT_FIRE;
|
||||
o->oFireSpitterScaleVel = 0.05f;
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void fire_spitter_act_spit_fire(void) {
|
||||
|
|
|
@ -14,18 +14,24 @@ void bhv_lll_floating_wood_bridge_loop(void) {
|
|||
s32 i;
|
||||
switch (o->oAction) {
|
||||
case 0:
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
if (o->oDistanceToMario < 2500.0f) {
|
||||
#endif
|
||||
for (i = 1; i < 4; i++) {
|
||||
sp3C = spawn_object_relative(0, (i - 2) * 300, 0, 0, o, MODEL_LLL_WOOD_BRIDGE,
|
||||
bhvLllWoodPiece);
|
||||
sp3C->oLllWoodPieceUnkF4 = i * 4096;
|
||||
}
|
||||
o->oAction = 1;
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case 1:
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
if (o->oDistanceToMario > 2600.0f)
|
||||
o->oAction = 2;
|
||||
#endif
|
||||
break;
|
||||
case 2:
|
||||
o->oAction = 0;
|
||||
|
|
|
@ -30,7 +30,9 @@ void fire_bar_spawn_flames(s16 a0) {
|
|||
}
|
||||
|
||||
void fire_bar_act_0(void) {
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
if (o->oDistanceToMario < 3000.0f)
|
||||
#endif
|
||||
o->oAction = 1;
|
||||
}
|
||||
|
||||
|
@ -45,8 +47,10 @@ void fire_bar_act_1(void) {
|
|||
void fire_bar_act_2(void) {
|
||||
o->oAngleVelYaw = -0x100;
|
||||
o->oMoveAngleYaw += o->oAngleVelYaw;
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
if (o->oDistanceToMario > 3200.0f)
|
||||
o->oAction = 3;
|
||||
#endif
|
||||
}
|
||||
|
||||
void fire_bar_act_3(void) {
|
||||
|
|
|
@ -527,11 +527,15 @@ void set_object_visibility(struct Object *obj, s32 dist) {
|
|||
f32 objY = obj->oPosY;
|
||||
f32 objZ = obj->oPosZ;
|
||||
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
if (is_point_within_radius_of_mario(objX, objY, objZ, dist) == TRUE) {
|
||||
#endif
|
||||
obj->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE;
|
||||
#ifndef NODRAWINGDISTANCE
|
||||
} else {
|
||||
obj->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue