From 278717bb0473ad2cb50c5916e9c6aff2dbcbc014 Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Tue, 15 Oct 2024 12:11:20 +1100 Subject: Player "Hostile" Docs (#1706) * actor flag hostile * player hostile --- src/code/z_player_lib.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/code/z_player_lib.c') 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) { -- cgit v1.2.3