Skip to content

Invisibility floating point fix

Ryan Yappert requested to merge RootOfAllThings/t-engine4:invis_fix into master

Adjusts several stealth and invisibility granting talents/effects/artifacts (Invisibility, Ethereal Rune, Hymns, Projection, etc.) to always round their granted stealth/invisibility powers (attributes stealth and invisible). This constitutes a very slight buff to these effects, but addresses a fairly common issue most often seen on Shalore where floating point errors will accumulate when multiple invisibility effects are applied. The resulting A + B - B - A ~= 0 error will cause permanent invisibility at very low power ( ~10^-15 ), along with an obnoxious screen and actor shader.

Stealth didn't suffer from this issue as only two effects grant stealth, but was changed for consistency.

This MR also fixes a bug in the description of Projection; the granted stealth/invisible detection power was half what the description wrote. The description was adjusted to match the actual behavior.

This MR is save safe, although bugged games and actors already under the effects of a modified talent won't update until the effect is applied.

Merge request reports

Loading