mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 06:21:16 +00:00
Hostile Lock-On (#2193)
* document flag and functions * format * adjust comment * make the comment more public-facing-friendly
This commit is contained in:
parent
e6e067428e
commit
e658bed27e
7 changed files with 75 additions and 51 deletions
|
@ -404,7 +404,7 @@ void EnTest_ChooseAction(EnTest* this, PlayState* play) {
|
|||
} else {
|
||||
if (this->actor.xzDistToPlayer < 110.0f) {
|
||||
if (Rand_ZeroOne() > 0.2f) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_4) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_HOSTILE_LOCK_ON) {
|
||||
if (this->actor.isLockedOn) {
|
||||
EnTest_SetupSlashDown(this);
|
||||
} else {
|
||||
|
@ -690,7 +690,7 @@ void EnTest_WalkAndBlock(EnTest* this, PlayState* play) {
|
|||
|
||||
if (this->actor.xzDistToPlayer < 110.0f) {
|
||||
if (Rand_ZeroOne() > 0.2f) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_4) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_HOSTILE_LOCK_ON) {
|
||||
if (this->actor.isLockedOn) {
|
||||
EnTest_SetupSlashDown(this);
|
||||
} else {
|
||||
|
@ -975,7 +975,7 @@ void EnTest_SlashDownEnd(EnTest* this, PlayState* play) {
|
|||
if ((ABS(yawDiff) > 0x3E80) && (this->actor.params != STALFOS_TYPE_CEILING)) {
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
EnTest_SetupJumpBack(this);
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_4) {
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_HOSTILE_LOCK_ON) {
|
||||
if (this->actor.isLockedOn) {
|
||||
EnTest_SetupSlashDown(this);
|
||||
} else if ((play->gameplayFrames % 2) != 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue