/// Threshold for distance user from the used OR target entities.
/// </summary>
[DataField]
- public float? DistanceThreshold;
+ public float? DistanceThreshold = 1.5f;
/// <summary>
/// Whether damage will cancel the DoAfter. See also <see cref="DamageThreshold"/>.
if (!_interaction.InRangeUnobstructed(args.User, args.Target.Value, args.DistanceThreshold.Value))
return true;
}
- else
- {
- if (!_interaction.InRangeUnobstructed(args.User, args.Target.Value))
- return true;
- }
}
// Whether the distance between the tool and the user has grown too much.
args.DistanceThreshold.Value))
return true;
}
- else
- {
- if (!_interaction.InRangeUnobstructed(args.User,args.Used.Value))
- return true;
- }
}
if (args.AttemptFrequency == AttemptFrequency.EveryTick && !TryAttemptEvent(doAfter))