summaryrefslogtreecommitdiff
path: root/src/object/bird.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/object/bird.c')
-rw-r--r--src/object/bird.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/object/bird.c b/src/object/bird.c
index 94b13bf2..44af688e 100644
--- a/src/object/bird.c
+++ b/src/object/bird.c
@@ -4,6 +4,7 @@
#include "item.h"
#include "message.h"
#include "game.h"
+#include "collision.h"
extern u16 script_EzloTalkOcarina[];
@@ -211,10 +212,11 @@ void Bird_Type8(Entity* this) {
this->speed = 0x300;
}
- if ((gPlayerEntity.flags & ENT_COLLIDE) && (gMessage.doTextBox & 0x7f) == 0 && gPlayerEntity.action != PLAYER_SLEEP &&
- gPlayerEntity.action != PLAYER_BOUNCE && gPlayerEntity.action != PLAYER_MINISH && gPlayerState.framestate != PL_STATE_CLIMB &&
- gPlayerState.framestate != PL_STATE_JUMP && gPlayerState.framestate != PL_STATE_PARACHUTE && PlayerCanBeMoved() &&
- (EntityInRectRadius(this, &gPlayerEntity, 0xe, 0xe))) {
+ if ((gPlayerEntity.flags & ENT_COLLIDE) && (gMessage.doTextBox & 0x7f) == 0 &&
+ gPlayerEntity.action != PLAYER_SLEEP && gPlayerEntity.action != PLAYER_BOUNCE &&
+ gPlayerEntity.action != PLAYER_MINISH && gPlayerState.framestate != PL_STATE_CLIMB &&
+ gPlayerState.framestate != PL_STATE_JUMP && gPlayerState.framestate != PL_STATE_PARACHUTE &&
+ PlayerCanBeMoved() && (EntityInRectRadius(this, &gPlayerEntity, 0xe, 0xe))) {
s32 z = gPlayerEntity.z.HALF.HI - this->z.HALF.HI - 8;
if ((u16)z < 0x20 && gPlayerEntity.health != 0) {
pEVar5 = CreateObject(0x95, 10, 0);