Commit 0f13c1d
Bars: write class/custom health colour to the texture vertex directly
ApplyHealthColors used two different channels per mode: PERCENT paints
the status bar texture's vertex colour directly (gradient curve), while
CLASS/CUSTOM went through StatusBar:SetStatusBarColor. The StatusBar
caches its colour, so after a PERCENT render stained the texture,
switching to CLASS could call SetStatusBarColor with values equal to
the cached colour and no-op - leaving the last gradient colour (green
at full health) visible on every frame until reload. Reports: "class
coloured healthbars stuck green", profile data verified healthy
(healthColorMode=CLASS, correct classColors) via decoded export.
Write the same rgb through tex:SetVertexColor as well, matching the
channel UpdateHealthBarAppearance (ElementAppearance) already uses for
every mode, so the two colour appliers can no longer disagree and the
visible state is guaranteed regardless of the StatusBar's cache.
Dead-fade is unaffected: it rides alpha (fadeDeadHealthBar), and the
alpha guard is preserved.1 parent a83594d commit 0f13c1d
2 files changed
Lines changed: 26 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
4 | 10 | | |
5 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
294 | 307 | | |
295 | 308 | | |
296 | 309 | | |
297 | 310 | | |
298 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
299 | 315 | | |
300 | 316 | | |
301 | 317 | | |
| |||
0 commit comments