Merge branch 'juliancoffee/fix_buff_bar' into 'master'

Fix bug with missing Burning icon

See merge request veloren/veloren!2195
This commit is contained in:
Samuel Keiffer 2021-04-25 15:55:43 +00:00
commit f31feff1aa
2 changed files with 4 additions and 6 deletions

View File

@ -100,6 +100,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Sfx volume changes now also change the ambient sounds volume
- Staff fire shockwave ability no longer has an unlimited vertical range
- Skillbar buttons correctly account for skill points when checking if player has enough stamina for the ability.
- Burning Debuff icon is now displayed correctly.
## [0.9.0] - 2021-03-20

View File

@ -213,6 +213,7 @@ impl<'a> Widget for BuffsBar<'a> {
0.0 + y as f64 * (41.0),
1.5 + x as f64 * (43.0),
);
buff_widget
.color(
if current_duration.map_or(false, |cur| cur.as_secs_f32() < 10.0) {
@ -284,11 +285,7 @@ impl<'a> Widget for BuffsBar<'a> {
max_duration
.map_or(1000.0, |max| cur.as_secs_f32() / max.as_secs_f32() * 1000.0)
}) as u32; // Percentage to determine which frame of the timer overlay is displayed
let debuff_img = match debuff.kind {
BuffKind::Bleeding { .. } => self.imgs.debuff_bleed_0,
BuffKind::Cursed { .. } => self.imgs.debuff_skull_0,
_ => self.imgs.missing_icon,
};
let debuff_img = hud::get_buff_image(debuff.kind, self.imgs);
let debuff_widget = Image::new(debuff_img).w_h(40.0, 40.0);
// Sort buffs into rows of 11 slots
let x = i % 6;
@ -385,7 +382,7 @@ impl<'a> Widget for BuffsBar<'a> {
max_duration
.map_or(1000.0, |max| cur.as_secs_f32() / max.as_secs_f32() * 1000.0)
}) as u32;
let buff_img = hud::get_buff_image(buff.kind, &self.imgs);
let buff_img = hud::get_buff_image(buff.kind, self.imgs);
let buff_widget = Image::new(buff_img).w_h(40.0, 40.0);
// Sort buffs into rows of 6 slots
let x = i % 6;