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
/// Tries to get a <see cref="HitboxIdentity"/> from a raycast.
4107
+
/// </summary>
4108
+
/// <param name="maxDistance">Maximum distance of raycast.</param>
4109
+
/// <param name="additionalMasks">Additional LayerMasks that should be applied to raycast. <see cref="LayerMasks.Hitbox"/> will be applied by default.</param>
4110
+
/// <param name="hitboxIdentity">Found <see cref="HitboxIdentity"/> or <c>null</c>.</param>
4111
+
/// <returns><c>true</c> if <paramref name="hitboxIdentity"/> was successfully found. Otherwise, <c>false</c>.</returns>
/// Tries to get a <see cref="Player"/> from a raycast.
4125
+
/// </summary>
4126
+
/// <param name="maxDistance">Maximum distance of raycast.</param>
4127
+
/// <param name="additionalMasks">Additional LayerMasks that should be applied to raycast. <see cref="LayerMasks.Hitbox"/> will be applied by default.</param>
4128
+
/// <param name="target">Found <see cref="Player"/> or <c>null</c>.</param>
4129
+
/// <returns><c>true</c> if <paramref name="target"/> was successfully found. Otherwise, <c>false</c>.</returns>
Copy file name to clipboardExpand all lines: EXILED/Exiled.Events/EventArgs/Player/InteractingShootingTargetEventArgs.cs
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,11 @@ public int NewMaxHp
74
74
set
75
75
{
76
76
if(!ShootingTarget.IsSynced)
77
-
thrownewInvalidOperationException("Attempted to set MaxHp while target is in local mode. Set target's IsSynced to true before setting IsAllowed.");
77
+
{
78
+
Log.Warn("Attempted to set MaxHp while target is in local mode. Set target's IsSynced to true before setting NewMaxHp.");
79
+
return;
80
+
}
81
+
78
82
field=Mathf.Clamp(value,1,256);
79
83
}
80
84
}
@@ -88,7 +92,11 @@ public int NewAutoResetTime
88
92
set
89
93
{
90
94
if(!ShootingTarget.IsSynced)
91
-
thrownewInvalidOperationException("Attempted to set AutoResetTime while target is in local mode. Set target's IsSynced to true before setting IsAllowed.");
95
+
{
96
+
Log.Warn("Attempted to set AutoResetTime while target is in local mode. Set target's IsSynced to true before setting NewAutoResetTime.");
0 commit comments