(a185ec0cd) Don't report on broken items that have condition above the threshold. Optimize and fix.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:41:25 +03:00
parent 79d01822d2
commit 1d5de494cd
84 changed files with 1733 additions and 1805 deletions
@@ -235,12 +235,12 @@ namespace Barotrauma.Items.Components
if (string.IsNullOrEmpty(objective.Option) || objective.Option.ToLowerInvariant() == "charge")
{
if (Math.Abs(rechargeSpeed - maxRechargeSpeed * 0.5f) > 0.05f)
if (Math.Abs(rechargeSpeed - maxRechargeSpeed * aiRechargeTargetRatio) > 0.05f)
{
#if SERVER
item.CreateServerEvent(this);
#endif
RechargeSpeed = maxRechargeSpeed * 0.5f;
RechargeSpeed = maxRechargeSpeed * aiRechargeTargetRatio;
#if CLIENT
rechargeSpeedSlider.BarScroll = RechargeSpeed / Math.Max(maxRechargeSpeed, 1.0f);
#endif