summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c
index a095ae500..62e991d38 100644
--- a/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c
+++ b/soh/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c
@@ -475,9 +475,13 @@ void EnClearTag_Update(Actor* thisx, PlayState* play2) {
Math_ApproachS(&this->actor.world.rot.z, 0, 15, this->targetDirection.z);
Math_ApproachF(&this->targetDirection.z, 0x500, 1.0f, 0x100);
+ // Introduce a range requirement in Enemy Rando so Arwings don't shoot the player from
+ // across the map. Especially noticeable in big maps like Lake Hylia and Hyrule Field.
+ uint8_t enemyRandoShootLaser = !CVarGetInteger("gRandomizedEnemies", 0) || this->actor.xzDistToPlayer < 1000.0f;
+
// Check if the Arwing should fire its laser.
if ((this->frameCounter % 4) == 0 && (Rand_ZeroOne() < 0.75f) &&
- (this->state == CLEAR_TAG_STATE_TARGET_LOCKED)) {
+ (this->state == CLEAR_TAG_STATE_TARGET_LOCKED) && enemyRandoShootLaser) {
this->shouldShootLaser = true;
}
} else {