Skip to content

Commit

Permalink
Update GlimmerSystem.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
VMSolidus committed Jun 28, 2024
1 parent 1c4f9e6 commit 84c1540
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Content.Shared/Psionics/Glimmer/GlimmerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,12 @@ public GlimmerTier GetGlimmerTier(float? glimmer = null)
};
}

// Ignore the bracket warnings on these, Intellisense is wrong and doesn't understand polynomials.
public void DeltaGlimmerInput(float delta)
{
if (_enabled && delta != 0)
{
GlimmerInput += delta;
GlimmerOutput = (2000 / (1 + MathF.Pow(MathF.E, -.0022f * GlimmerInput))) - 1000;
GlimmerOutput = 2000 / (1 + MathF.Pow(MathF.E, -.0022f * GlimmerInput)) - 1000;
}
}

Expand All @@ -88,7 +87,7 @@ public void DeltaGlimmerOutput(float delta)
if (_enabled && delta != 0)
{
GlimmerOutput += delta;
GlimmerInput = (2000 / (1 + MathF.Pow(MathF.E, -.0022f * GlimmerOutput))) - 1000;
GlimmerInput = 2000 / (1 + MathF.Pow(MathF.E, -.0022f * GlimmerOutput)) - 1000;
}
}

Expand All @@ -97,7 +96,7 @@ public void SetGlimmerOutput(float set)
if (_enabled && set != 0)
{
GlimmerOutput = set;
GlimmerInput = (2000 / (1 + MathF.Pow(MathF.E, -.0022f * GlimmerOutput))) - 1000;
GlimmerInput = 2000 / (1 + MathF.Pow(MathF.E, -.0022f * GlimmerOutput)) - 1000;
}
}

Expand All @@ -106,7 +105,7 @@ public void SetGlimmerInput(float set)
if (_enabled && set != 0)
{
GlimmerInput = set;
GlimmerOutput = (2000 / (1 + MathF.Pow(MathF.E, -.0022f * GlimmerOutput))) - 1000;
GlimmerOutput = 2000 / (1 + MathF.Pow(MathF.E, -.0022f * GlimmerOutput)) - 1000;
}
}
}
Expand Down

0 comments on commit 84c1540

Please sign in to comment.