You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because Target.attackable checks if the player.target is set to the target npc, it means any player can attack an npc even if it's currently in combat because character.target = target inside Combat.kts line 41 which occurs before attackable is checked.
This is because it's based on the assumption that target is only set when in combat. However this isn't true as target is set before entering combat and then removed if not attackable (self satisfying).
It also isn't a trivial fix as setting the target after checking attackable means the player can't re-attack the npc they're already fighting because target is set to null when combat stops for the split second when re-attacking.
The text was updated successfully, but these errors were encountered:
Because Target.attackable checks if the player.target is set to the target npc, it means any player can attack an npc even if it's currently in combat because
character.target = target
inside Combat.kts line 41 which occurs before attackable is checked.This is because it's based on the assumption that target is only set when in combat. However this isn't true as target is set before entering combat and then removed if not attackable (self satisfying).
It also isn't a trivial fix as setting the target after checking attackable means the player can't re-attack the npc they're already fighting because target is set to null when combat stops for the split second when re-attacking.
The text was updated successfully, but these errors were encountered: