Skip to content

Commit

Permalink
CanScp049SenseTutorial Fix bool logic (#2275)
Browse files Browse the repository at this point in the history
Co-authored-by: Bolton <[email protected]>
  • Loading branch information
louis1706 and BoltonDev authored Nov 20, 2023
1 parent d17e1d4 commit d65e9d8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Exiled.Events/Handlers/Internal/Round.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,11 @@ public static void OnChangingRole(ChangingRoleEventArgs ev)
/// <inheritdoc cref="Scp049.OnActivatingSense(ActivatingSenseEventArgs)" />
public static void OnActivatingSense(ActivatingSenseEventArgs ev)
{
if (!Events.Instance.Config.CanScp049SenseTutorial || ev.Target is null || ev.Target.Role.Type is not RoleTypeId.Tutorial)
if (ev.Target is null)
return;
if (ev.Scp049.SenseAbility.CanFindTarget(out ReferenceHub hub))
ev.Target = Player.Get(hub);
else
ev.Target = null;
if ((Events.Instance.Config.CanScp049SenseTutorial || ev.Target.Role.Type is not RoleTypeId.Tutorial) && !Scp049Role.TurnedPlayers.Contains(ev.Target))
return;
ev.Target = ev.Scp049.SenseAbility.CanFindTarget(out ReferenceHub hub) ? Player.Get(hub) : null;
}

/// <inheritdoc cref="Handlers.Player.OnVerified(VerifiedEventArgs)" />
Expand Down

0 comments on commit d65e9d8

Please sign in to comment.