diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2024-10-15 12:11:20 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-14 18:11:20 -0700 |
| commit | 278717bb0473ad2cb50c5916e9c6aff2dbcbc014 (patch) | |
| tree | 207af4b7e29c7e9609fcaea3707fcc384c083ca0 /src/code/z_player_lib.c | |
| parent | 3472e79caa697ba2b915850171f97f9515aec6b2 (diff) | |
Player "Hostile" Docs (#1706)
* actor flag hostile
* player hostile
Diffstat (limited to 'src/code/z_player_lib.c')
| -rw-r--r-- | src/code/z_player_lib.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index f7f63c09a..e3f3ce941 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -505,8 +505,15 @@ bool Player_InCsMode(PlayState* play) { return Player_InBlockingCsMode(play, player) || (player->unk_AA5 == PLAYER_UNKAA5_5); } -bool func_80123420(Player* player) { - return player->stateFlags3 & PLAYER_STATE3_80000000; +/** + * Checks if Player is currently locked onto a hostile actor. + * `PLAYER_STATE3_HOSTILE_LOCK_ON` controls Player's "battle" response to hostile actors. + * + * Note that within Player, `Player_UpdateHostileLockOn` exists, which updates the flag and also returns the check. + * Player can use this function instead if the flag should be checked, but not updated. + */ +bool Player_CheckHostileLockOn(Player* player) { + return player->stateFlags3 & PLAYER_STATE3_HOSTILE_LOCK_ON; } bool func_80123434(Player* player) { |
