00-Evan / shattered-pixel-dungeon

Shattered Pixel Dungeon is an open-source traditional roguelike dungeon crawler with randomized levels and enemies, and hundreds of items to collect and use. It's based on the source code of Pixel Dungeon, by Watabou.

Home Page:https://shatteredpixel.com/shatteredpd/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(v2.4.0-RC-2) Turns until hourglass charge use: -0

bluestmango opened this issue · comments

Just a small quirk I found. When under a speed-boosting effect and the timekeeper's hourglass drops to 0 turns until charge use, it displays as -0 (negative zero) turns instead.

Confirmed this in both v2.4.0-RC-2 and v2.4.0-RC-1 using Nature's Power & Growing Power +4 for boosting speed
Probably worth checking for this with swiftthistle too, I didn't have any to test

This is due to floating point rounding errors, the true value of time left is something like -0.000001, which the game treats as 0 to avoid rounding errors removing one extra time freeze action. The game isn't doing that for the buff display though, so it shows -0 instead of 0.

fixed in commit c9c6380