Files
wwdpublic/Content.Shared/CCVar
VMSolidus 95e393406d Fix Various Psionic Bugs (#1848)
# Description

This isn't fixing all of them by the way, I still need to completely
rewrite the equations for the glimmer generating structures so the math
there isn't completely terrible. This fixes a few bugs related to the
glimmer system, such as linear decay not being consistent regardless of
server ping, and also glimmer generating structures also not being
consistent based on server ping. Both are now correctly differentiated
with respect to time.

Problem though is that the glimmer generator math is still extremely
awful, so that's going to need a rewrite.

After deeply analyzing the glimmer equations, I figured out that they
were being screwed over by floating point precision limits, so to
address this I made Glimmer work on doubles instead.

I also fixed a bug where generating enough Potentia to gain two or more
powers in a single draw caused the user to permanently lose their
ability to generate new powers. It's not abundantly clear why this was
happening, because nothing changed this code at all since I last touched
it.

# Changelog

🆑
- fix: Fixed various bugs with psionics.
- fix: Fixed a bug where if you generated enough Potentia during a drug
induced psionics roll to gain two powers, you would only gain one power
instead, while permanently losing the ability to gain new powers.
- fix: Fixed glimmer being permanently stuck between 500 and 600 by
revisiting the math and discovering an algebra error I made a year ago.
- tweak: Glimmer now operates on double precision. Have fun with that
breaking change if you made any psionic code downstream. Hint, you can
cast doubles into a (float) if you don't wish to convert your system to
double.

(cherry picked from commit 43e333ec41ca1706f3c204ef994351d69fd5c28c)
2025-04-18 16:58:05 +03:00
..
2025-01-20 21:12:54 +03:00
2025-03-27 08:08:00 +03:00
2025-03-15 16:05:58 +02:00
2025-03-11 17:05:26 +03:00
2025-01-21 12:19:05 +03:00
2025-01-25 14:46:18 +03:00
2025-03-15 16:05:58 +02:00
2025-01-20 21:09:07 +03:00
2025-01-21 12:19:05 +03:00
2025-03-15 16:05:58 +02:00
2025-01-20 21:12:54 +03:00
2025-01-20 21:12:36 +03:00