Skip to content

Commit

Permalink
Fix friendly fire logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed May 5, 2024
1 parent 41fd2e7 commit 210b183
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Fika.Core/Coop/Players/CoopPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ public override void ApplyDamageInfo(DamageInfo damageInfo, EBodyPart bodyPartTy
{
if (damageInfo.Player != null)
{
CoopPlayer player = (CoopPlayer)damageInfo.Player.iPlayer;
if (!player.IsObservedAI && !FikaPlugin.Instance.FriendlyFire)
if (!FikaPlugin.Instance.FriendlyFire && damageInfo.Player.iPlayer is ObservedCoopPlayer observedCoopPlayer && !observedCoopPlayer.IsObservedAI)
{
return;
}
Expand Down

0 comments on commit 210b183

Please sign in to comment.