mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-23 00:28:51 -05:00
Enemy Rando - Arwing range check (Khan Edition) (#2613)
* Arwing range check * Small code cleanup
This commit is contained in:
parent
1c00d56053
commit
095066ffcd
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user