Made bird Luigi-aware

This commit is contained in:
MysterD 2020-07-30 23:17:18 -07:00
parent 984593cdcf
commit 01192d364e
1 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,8 @@
static void bird_act_inactive(void) {
// Start flying if the object is a spawned bird or if it's a spawner bird
// and Mario is within 2000 units.
if (o->oBehParams2ndByte == BIRD_BP_SPAWNED || o->oDistanceToMario < 2000.0f) {
struct Object* player = nearest_player_object(o->oPosX, o->oPosY, o->oPosZ);
if (o->oBehParams2ndByte == BIRD_BP_SPAWNED || dist_between_objects(o, player) < 2000.0f) {
// If the object is a spawner bird, play the sound of birds flying away,
// and spawn 6 spawned birds (which will start flying on the next frame).
if (o->oBehParams2ndByte != BIRD_BP_SPAWNED) {