Barotrauma
Barotrauma copied to clipboard
weird effect applied to battery and supercapacitor state of charge progress bars.
Disclaimers
- [X] I have searched the issue tracker to check if the issue has already been reported.
- [ ] My issue happened while using mods.
What happened?
The state of charge progress bar on the super capacitor and battery seem to 'flicker' up and down 1 pixel (or up 2 pixels and then resets?)
The effect seems quite bad while the sub is moving, but still occurs at a slower rate (about 1hz) when locky and freecam is used to eliminate movement. The black outline around the progress bar also moves.
You may wish to avoid using line function(?) to draw it, and instead render a texture so the result gets properly filtered like all other graphics. There seems to be something else at play here though, since if it was aliasing it should only move between two positions and not three.
Reproduction steps
No response
Bug prevalence
Happens every time I play
Version
0.17.15.0
-
No response
Which operating system did you encounter this bug on?
Windows
Relevant error messages and crash reports
No response
@Regalis11 This was probably due to the DrawLine functions in GUI.cs casting floats to ints. I noticed this behavior as well when I was working on the rotation fix. This should be fixed for power-containers now since the fix I put up doesn't use DrawLine anymore, but it is something to keep in mind for other places that do use DrawLine
Tested against dev commit https://github.com/Regalis11/Barotrauma-development/commit/3f874d71a8cdc82d1d16314abdd6ae91f7e42098, no issues found, closing.
Notes: This was fixed in https://github.com/Regalis11/Barotrauma-development/commit/59f2fe767592d2868f5f621e89e468b121a62c1c