diff --git a/assets/xml/objects/gameplay_keep.xml b/assets/xml/objects/gameplay_keep.xml
index 0d8da9f866..590f8e3748 100644
--- a/assets/xml/objects/gameplay_keep.xml
+++ b/assets/xml/objects/gameplay_keep.xml
@@ -931,8 +931,8 @@
-
-
+
+
diff --git a/include/z64actor.h b/include/z64actor.h
index 2d91dcbe48..f1cdf30e2d 100644
--- a/include/z64actor.h
+++ b/include/z64actor.h
@@ -9,8 +9,8 @@
#define ACTOR_NUMBER_MAX 200
#define INVISIBLE_ACTOR_MAX 20
#define AM_FIELD_SIZE 0x27A0
-#define MASS_IMMOVABLE 0xFF // Cannot be pushed by OC collisions
-#define MASS_HEAVY 0xFE // Can only be pushed by OC collisions with IMMOVABLE and HEAVY objects.
+#define MASS_IMMOVABLE 0xFF // Cannot be pushed by OC colliders
+#define MASS_HEAVY 0xFE // Can only be pushed by OC colliders from actors with IMMOVABLE or HEAVY mass.
struct Actor;
struct GlobalContext;
@@ -266,6 +266,7 @@ typedef enum {
/* 0x17 */ ITEM00_TUNIC_ZORA,
/* 0x18 */ ITEM00_TUNIC_GORON,
/* 0x19 */ ITEM00_BOMBS_SPECIAL,
+ /* 0x1A */ ITEM00_MAX,
/* 0xFF */ ITEM00_NONE = 0xFF
} Item00Type;
diff --git a/include/z64collision_check.h b/include/z64collision_check.h
index 1cc6222fe2..e8bee4cac5 100644
--- a/include/z64collision_check.h
+++ b/include/z64collision_check.h
@@ -195,7 +195,7 @@ typedef struct {
/* 0x00 */ Vec3f quad[4];
/* 0x30 */ Vec3s dcMid; // midpoint of vectors d, c
/* 0x36 */ Vec3s baMid; // midpoint of vectors b, a
- /* 0x3C */ f32 acDist; // distance to nearest AC collision this frame.
+ /* 0x3C */ f32 acDistSq; // distance to nearest AC collision this frame, squared.
} ColliderQuadDim; // size = 0x40
typedef struct {
diff --git a/src/code/fault.c b/src/code/fault.c
index e03c94d591..99a4a1ddfa 100644
--- a/src/code/fault.c
+++ b/src/code/fault.c
@@ -1107,7 +1107,7 @@ void Fault_DisplayFrameBuffer(void) {
osViSetSpecialFeatures(OS_VI_GAMMA_OFF | OS_VI_DITHER_FILTER_ON);
osViBlack(false);
- if (sFaultInstance->fb) {
+ if (sFaultInstance->fb != NULL) {
fb = sFaultInstance->fb;
} else {
fb = osViGetNextFramebuffer();
diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c
index 1f62b536cf..7ccafebc46 100644
--- a/src/code/z_collision_check.c
+++ b/src/code/z_collision_check.c
@@ -858,7 +858,7 @@ s32 Collider_DestroyQuadDim(GlobalContext* globalCtx, ColliderQuadDim* dim) {
}
s32 Collider_ResetQuadACDist(GlobalContext* globalCtx, ColliderQuadDim* dim) {
- dim->acDist = 1.0E38f;
+ dim->acDistSq = 1.0E38f;
return true;
}
@@ -959,16 +959,16 @@ s32 Collider_ResetQuadOC(GlobalContext* globalCtx, Collider* collider) {
* otherwise returns false. Used on player AT colliders to prevent multiple collisions from registering.
*/
s32 Collider_QuadSetNearestAC(GlobalContext* globalCtx, ColliderQuad* quad, Vec3f* hitPos) {
- f32 acDist;
+ f32 acDistSq;
Vec3f dcMid;
if (!(quad->info.toucherFlags & TOUCH_NEAREST)) {
return true;
}
Math_Vec3s_ToVec3f(&dcMid, &quad->dim.dcMid);
- acDist = Math3D_Vec3fDistSq(&dcMid, hitPos);
- if (acDist < quad->dim.acDist) {
- quad->dim.acDist = acDist;
+ acDistSq = Math3D_Vec3fDistSq(&dcMid, hitPos);
+ if (acDistSq < quad->dim.acDistSq) {
+ quad->dim.acDistSq = acDistSq;
if (quad->info.atHit != NULL) {
Collider_ResetACBase(globalCtx, quad->info.atHit);
}
diff --git a/src/code/z_horse.c b/src/code/z_horse.c
index 28fd9a904f..56b8776016 100644
--- a/src/code/z_horse.c
+++ b/src/code/z_horse.c
@@ -135,10 +135,10 @@ void func_8006D684(GlobalContext* globalCtx, Player* player) {
gSaveContext.entranceIndex == 0x0292 || gSaveContext.entranceIndex == 0x0476) &&
(gSaveContext.respawnFlag == 0)) {
Vec3s spawnPositions[] = {
- { 0xF46F, 0x0139, 0x1E14 },
- { 0xF894, 0x0139, 0x1B67 },
- { 0xF035, 0x0139, 0x1B15 },
- { 0xF6F7, 0x0139, 0x1766 },
+ { -2961, 313, 7700 },
+ { -1900, 313, 7015 },
+ { -4043, 313, 6933 },
+ { -2313, 313, 5990 },
};
if (gSaveContext.entranceIndex == 0x028A) {
diff --git a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c
index 384c389e66..e61cd2b4b0 100644
--- a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c
+++ b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c
@@ -165,7 +165,8 @@ void BgHakaTubo_DropCollectible(BgHakaTubo* this, GlobalContext* globalCtx) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
// Drop rupees
for (i = 0; i < 9; i++) {
- collectible = Item_DropCollectible(globalCtx, &spawnPos, i % 3);
+ collectible = Item_DropCollectible(
+ globalCtx, &spawnPos, (i % (ITEM00_RUPEE_RED - ITEM00_RUPEE_GREEN + 1)) + ITEM00_RUPEE_GREEN);
if (collectible != NULL) {
collectible->actor.velocity.y = 15.0f;
collectible->actor.world.rot.y = this->dyna.actor.shape.rot.y + (i * 0x1C71);
diff --git a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c
index 9c0521d12f..f916eb017b 100644
--- a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c
+++ b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c
@@ -251,7 +251,7 @@ void func_808B8F08(BgSpot18Obj* this, GlobalContext* globalCtx) {
func_808B8DDC(this, globalCtx);
if (Math3D_Dist2DSq(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.z, this->dyna.actor.home.pos.x,
- this->dyna.actor.home.pos.z) >= 6400.0f) {
+ this->dyna.actor.home.pos.z) >= SQ(80.0f)) {
func_808B9030(this);
this->dyna.actor.world.pos.x = (Math_SinS(this->dyna.actor.world.rot.y) * 80.0f) + this->dyna.actor.home.pos.x;
this->dyna.actor.world.pos.z = (Math_CosS(this->dyna.actor.world.rot.y) * 80.0f) + this->dyna.actor.home.pos.z;
diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c
index 865c74f748..58ffd88aed 100644
--- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c
+++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c
@@ -2738,7 +2738,7 @@ void BossSst_DrawHand(Actor* thisx, GlobalContext* globalCtx) {
trail2 = &this->handTrails[(idx + 2) % 7];
for (i = 0; i < end; i++) {
- if (Math3D_Vec3fDistSq(&trail2->world.pos, &trail->world.pos) > 900.0f) {
+ if (Math3D_Vec3fDistSq(&trail2->world.pos, &trail->world.pos) > SQ(30.0f)) {
Matrix_SetTranslateRotateYXZ(trail->world.pos.x, trail->world.pos.y, trail->world.pos.z,
&trail->world.rot);
Matrix_Scale(0.02f, 0.02f, 0.02f, MTXMODE_APPLY);
diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c
index 4643558fed..2d8d581969 100644
--- a/src/overlays/actors/ovl_En_Box/z_en_box.c
+++ b/src/overlays/actors/ovl_En_Box/z_en_box.c
@@ -289,7 +289,7 @@ void func_809C9700(EnBox* this, GlobalContext* globalCtx) {
func_8002F5F0(&this->dyna.actor, globalCtx);
}
- if (Math3D_Vec3fDistSq(&this->dyna.actor.world.pos, &player->actor.world.pos) > 22500.0f) {
+ if (Math3D_Vec3fDistSq(&this->dyna.actor.world.pos, &player->actor.world.pos) > SQ(150.0f)) {
this->unk_1FB = ENBOX_STATE_0;
} else {
if (this->unk_1FB == ENBOX_STATE_0) {
diff --git a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c
index 634a485ca4..065da52c7f 100644
--- a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c
+++ b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c
@@ -198,7 +198,7 @@ void EnEncount1_SpawnTektites(EnEncount1* this, GlobalContext* globalCtx) {
}
spawnPos.y = floorY;
if (Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_TITE, spawnPos.x,
- spawnPos.y, spawnPos.z, 0, 0, 0, TEKTITE_RED) != NULL) { // Red tektite
+ spawnPos.y, spawnPos.z, 0, 0, 0, TEKTITE_RED) != NULL) {
this->curNumSpawn++;
this->totalNumSpawn++;
} else {
diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c
index 59aa564a4e..73dfb95ff3 100644
--- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c
+++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c
@@ -123,23 +123,23 @@ void func_80A7BF58(EnInsect* this) {
*/
s32 EnInsect_FoundNearbySoil(EnInsect* this, GlobalContext* globalCtx) {
Actor* currentActor;
- f32 currentDistance;
- f32 bestDistance;
+ f32 currentDistanceSq;
+ f32 bestDistanceSq;
s32 ret;
ret = 0;
currentActor = globalCtx->actorCtx.actorLists[ACTORCAT_ITEMACTION].head;
- bestDistance = 6400.0f;
+ bestDistanceSq = 6400.0f;
this->soilActor = NULL;
while (currentActor != NULL) {
if (currentActor->id == ACTOR_OBJ_MAKEKINSUTA) {
- currentDistance = Math3D_Dist2DSq(this->actor.world.pos.x, this->actor.world.pos.z,
- currentActor->world.pos.x, currentActor->world.pos.z);
+ currentDistanceSq = Math3D_Dist2DSq(this->actor.world.pos.x, this->actor.world.pos.z,
+ currentActor->world.pos.x, currentActor->world.pos.z);
- if (currentDistance < bestDistance && currentActor->room == this->actor.room) {
+ if (currentDistanceSq < bestDistanceSq && currentActor->room == this->actor.room) {
ret = 1;
- bestDistance = currentDistance;
+ bestDistanceSq = currentDistanceSq;
this->soilActor = (ObjMakekinsuta*)currentActor;
}
}
@@ -429,7 +429,7 @@ void func_80A7CC3C(EnInsect* this, GlobalContext* globalCtx) {
if (this->unk_31A <= 0) {
if ((this->unk_314 & 0x10) && this->soilActor != NULL &&
- Math3D_Vec3fDistSq(&this->soilActor->actor.world.pos, &this->actor.world.pos) < 64.0f) {
+ Math3D_Vec3fDistSq(&this->soilActor->actor.world.pos, &this->actor.world.pos) < SQ(8.0f)) {
this->soilActor->unk_152 = 1;
}
Actor_Kill(&this->actor);
diff --git a/src/overlays/actors/ovl_En_Ny/z_en_ny.c b/src/overlays/actors/ovl_En_Ny/z_en_ny.c
index e9b529438c..428456afbb 100644
--- a/src/overlays/actors/ovl_En_Ny/z_en_ny.c
+++ b/src/overlays/actors/ovl_En_Ny/z_en_ny.c
@@ -441,7 +441,7 @@ void EnNy_SetupDie(EnNy* this, GlobalContext* globalCtx) {
if (this->unk_1D0 == 0) {
Item_DropCollectibleRandom(globalCtx, &this->actor, &this->actor.world.pos, 0xA0);
} else {
- Item_DropCollectible(globalCtx, &this->actor.world.pos, 8);
+ Item_DropCollectible(globalCtx, &this->actor.world.pos, ITEM00_ARROWS_SMALL);
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NYU_DEAD);
this->actionFunc = EnNy_Die;
diff --git a/src/overlays/actors/ovl_En_Sb/z_en_sb.c b/src/overlays/actors/ovl_En_Sb/z_en_sb.c
index 869ca5d62c..5d31aef961 100644
--- a/src/overlays/actors/ovl_En_Sb/z_en_sb.c
+++ b/src/overlays/actors/ovl_En_Sb/z_en_sb.c
@@ -453,7 +453,7 @@ void EnSb_Update(Actor* thisx, GlobalContext* globalCtx) {
if (!this->hitByWindArrow) {
Item_DropCollectibleRandom(globalCtx, &this->actor, &this->actor.world.pos, 0x80);
} else {
- Item_DropCollectible(globalCtx, &this->actor.world.pos, 8);
+ Item_DropCollectible(globalCtx, &this->actor.world.pos, ITEM00_ARROWS_SMALL);
}
Actor_Kill(&this->actor);
}
diff --git a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c
index af04cfce41..9f9b53b39b 100644
--- a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c
+++ b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c
@@ -72,10 +72,10 @@ void EnTuboTrap_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void EnTuboTrap_DropCollectible(EnTuboTrap* this, GlobalContext* globalCtx) {
s16 params = this->actor.params;
- s16 param3FF = (params >> 6) & 0x3FF;
+ s16 dropType = (params >> 6) & 0x3FF;
- if (param3FF >= 0 && param3FF < 0x1A) {
- Item_DropCollectible(globalCtx, &this->actor.world.pos, param3FF | ((params & 0x3F) << 8));
+ if (dropType >= 0 && dropType < ITEM00_MAX) {
+ Item_DropCollectible(globalCtx, &this->actor.world.pos, dropType | ((params & 0x3F) << 8));
}
}
diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c
index 6c208f13a4..5f489f27bc 100644
--- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c
+++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c
@@ -133,7 +133,7 @@ void func_80B5357C(EnZl3* this, GlobalContext* globalCtx) {
sp20.x = thisPos->x + ((Rand_ZeroOne() - 0.5f) * 10.0f);
sp20.y = thisPos->y;
sp20.z = thisPos->z + ((Rand_ZeroOne() - 0.5f) * 10.0f);
- Item_DropCollectible(globalCtx, &sp20, 3);
+ Item_DropCollectible(globalCtx, &sp20, ITEM00_HEART);
}
void func_80B53614(EnZl3* this, GlobalContext* globalCtx) {
diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c
index 566d4edfc5..1aed8084c6 100644
--- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c
+++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c
@@ -290,7 +290,7 @@ s32 ObjBean_CheckForHorseTrample(ObjBean* this, GlobalContext* globalCtx) {
while (currentActor != NULL) {
if ((currentActor->id == ACTOR_EN_HORSE) &&
- (Math3D_Vec3fDistSq(¤tActor->world.pos, &this->dyna.actor.world.pos) < 10000.0f)) {
+ (Math3D_Vec3fDistSq(¤tActor->world.pos, &this->dyna.actor.world.pos) < SQ(100.0f))) {
return true;
}
currentActor = currentActor->next;
diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c
index 686984afc7..bf7edd9690 100644
--- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c
+++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c
@@ -130,8 +130,8 @@ void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx) {
void ObjComb_ChooseItemDrop(ObjComb* this, GlobalContext* globalCtx) {
s16 params = this->actor.params & 0x1F;
- if ((params > 0) || (params < 0x1A)) {
- if (params == 6) {
+ if ((params > 0) || (params < ITEM00_MAX)) { // conditional always true. May have been intended to be &&
+ if (params == ITEM00_HEART_PIECE) {
if (Flags_GetCollectible(globalCtx, (this->actor.params >> 8) & 0x3F)) {
params = -1;
} else {
diff --git a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c
index af43b223e5..6643b11ff1 100644
--- a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c
+++ b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c
@@ -67,7 +67,7 @@ void ObjKibako_SpawnCollectible(ObjKibako* this, GlobalContext* globalCtx) {
s16 collectible;
collectible = this->actor.params & 0x1F;
- if ((collectible >= 0) && (collectible <= 0x19)) {
+ if ((collectible >= 0) && (collectible < ITEM00_MAX)) {
Item_DropCollectible(globalCtx, &this->actor.world.pos,
collectible | (((this->actor.params >> 8) & 0x3F) << 8));
}
diff --git a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c
index 3cbce27fe8..378c5bad8c 100644
--- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c
+++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c
@@ -109,7 +109,7 @@ void ObjKibako2_SpawnCollectible(ObjKibako2* this, GlobalContext* globalCtx) {
collectibleFlagTemp = this->collectibleFlag;
itemDropped = this->dyna.actor.home.rot.x;
- if (itemDropped >= 0 && itemDropped < 0x1A) {
+ if (itemDropped >= 0 && itemDropped < ITEM00_MAX) {
Item_DropCollectible(globalCtx, &this->dyna.actor.world.pos, itemDropped | (collectibleFlagTemp << 8));
}
}
diff --git a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c
index bcc56d7644..378bc614a7 100644
--- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c
+++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c
@@ -85,7 +85,7 @@ static InitChainEntry sInitChain[] = {
void ObjTsubo_SpawnCollectible(ObjTsubo* this, GlobalContext* globalCtx) {
s16 dropParams = this->actor.params & 0x1F;
- if ((dropParams >= ITEM00_RUPEE_GREEN) && (dropParams <= ITEM00_BOMBS_SPECIAL)) {
+ if ((dropParams >= 0) && (dropParams < ITEM00_MAX)) {
Item_DropCollectible(globalCtx, &this->actor.world.pos,
(dropParams | (((this->actor.params >> 9) & 0x3F) << 8)));
}
diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c
index 0e38e7ca94..e6c6b2cc4b 100644
--- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c
+++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c
@@ -493,7 +493,7 @@ void ObjectKankyo_DrawFairies(ObjectKankyo* this2, GlobalContext* globalCtx2) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_object_kankyo.c", 807);
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x14);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gSun1Tex));
- gSPDisplayList(POLY_XLU_DISP++, gKokiriDustMoteTextureLoadDL);
+ gSPDisplayList(POLY_XLU_DISP++, gKokiriDustMoteMaterialDL);
for (i = 0; i < globalCtx->envCtx.unk_EE[3]; i++) {
Matrix_Translate(this->effects[i].base.x + this->effects[i].pos.x,
@@ -560,7 +560,7 @@ void ObjectKankyo_DrawFairies(ObjectKankyo* this2, GlobalContext* globalCtx2) {
Matrix_Mult(&globalCtx->billboardMtxF, MTXMODE_APPLY);
Matrix_RotateZ(DEG_TO_RAD(globalCtx->state.frames * 20.0f), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_object_kankyo.c", 913), G_MTX_LOAD);
- gSPDisplayList(POLY_XLU_DISP++, gKokiriDustMoteDL);
+ gSPDisplayList(POLY_XLU_DISP++, gKokiriDustMoteModelDL);
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_object_kankyo.c", 922);
}
diff --git a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c
index 15b71bd2d8..231abea0e1 100644
--- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c
+++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c
@@ -123,7 +123,7 @@ void func_80BADF0C(ShotSun* this, GlobalContext* globalCtx) {
s32 pad;
s32 params = this->actor.params & 0xFF;
- if (Math3D_Vec3fDistSq(&this->actor.world.pos, &player->actor.world.pos) > 22500.0f) {
+ if (Math3D_Vec3fDistSq(&this->actor.world.pos, &player->actor.world.pos) > SQ(150.0f)) {
this->unk_1A4 = 0;
} else {
if (this->unk_1A4 == 0) {
diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c
index b0113512b1..4be6c49b79 100644
--- a/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/src/overlays/actors/ovl_player_actor/z_player.c
@@ -6064,12 +6064,13 @@ static s32 D_80854598[] = {
};
void func_8083E4C4(GlobalContext* globalCtx, Player* this, GetItemEntry* giEntry) {
- s32 sp1C = giEntry->field & 0x1F;
+ s32 dropType = giEntry->field & 0x1F;
if (!(giEntry->field & 0x80)) {
- Item_DropCollectible(globalCtx, &this->actor.world.pos, sp1C | 0x8000);
- if ((sp1C != 4) && (sp1C != 8) && (sp1C != 9) && (sp1C != 0xA) && (sp1C != 0) && (sp1C != 1) && (sp1C != 2) &&
- (sp1C != 0x14) && (sp1C != 0x13)) {
+ Item_DropCollectible(globalCtx, &this->actor.world.pos, dropType | 0x8000);
+ if ((dropType != ITEM00_BOMBS_A) && (dropType != ITEM00_ARROWS_SMALL) && (dropType != ITEM00_ARROWS_MEDIUM) &&
+ (dropType != ITEM00_ARROWS_LARGE) && (dropType != ITEM00_RUPEE_GREEN) && (dropType != ITEM00_RUPEE_BLUE) &&
+ (dropType != ITEM00_RUPEE_RED) && (dropType != ITEM00_RUPEE_PURPLE) && (dropType != ITEM00_RUPEE_ORANGE)) {
Item_Give(globalCtx, giEntry->itemId);
}
} else {