Fix AI bool curves (#1809)

I was a silly billy. AI were only picking up 1 item because 0.5 was being treated as a fail.

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2020-08-20 21:47:47 +10:00
committed by GitHub
parent c6abeda53b
commit 599b316212

View File

@@ -24,7 +24,7 @@ namespace Content.Server.AI.Utility.Considerations
private static float BoolCurve(float x)
{
// ReSharper disable once CompareOfFloatsByEqualityOperator
return x == 1.0f ? 1.0f : 0.0f;
return x > 0.0f ? 1.0f : 0.0f;
}
public Func<float> BoolCurve(Blackboard context)
@@ -42,7 +42,7 @@ namespace Content.Server.AI.Utility.Considerations
private static float InverseBoolCurve(float x)
{
// ReSharper disable once CompareOfFloatsByEqualityOperator
return x == 1.0f ? 0.0f : 1.0f;
return x == 0.0f ? 1.0f : 0.0f;
}
public Func<float> InverseBoolCurve(Blackboard context)