aboutsummaryrefslogtreecommitdiff
path: root/src/client/hud.cpp
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-01-07 12:35:04 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-01-07 12:35:04 +0100
commitcca4254f7c502b3e75691c6a3087da7cfcd72e28 (patch)
treee71b47442e77e09ca17e2c9c121a455f9deeace2 /src/client/hud.cpp
parent4fedc3a31ee20813e4c81377b3bd2af05a26b858 (diff)
parent58a709096ef8ff17644cf201f25b1831d9506514 (diff)
downloaddragonfireclient-cca4254f7c502b3e75691c6a3087da7cfcd72e28.tar.xz
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'src/client/hud.cpp')
-rw-r--r--src/client/hud.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/hud.cpp b/src/client/hud.cpp
index f6497fe25..e956c2738 100644
--- a/src/client/hud.cpp
+++ b/src/client/hud.cpp
@@ -100,7 +100,7 @@ Hud::Hud(gui::IGUIEnvironment *guienv, Client *client, LocalPlayer *player,
if (g_settings->getBool("enable_shaders")) {
IShaderSource *shdrsrc = client->getShaderSource();
u16 shader_id = shdrsrc->getShader(
- m_mode == HIGHLIGHT_HALO ? "selection_shader" : "default_shader", 1, 1);
+ m_mode == HIGHLIGHT_HALO ? "selection_shader" : "default_shader", TILE_MATERIAL_ALPHA);
m_selection_material.MaterialType = shdrsrc->getShaderInfo(shader_id).material;
} else {
m_selection_material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
@@ -1055,9 +1055,9 @@ void drawItemStack(
if (def.type == ITEM_TOOL && item.wear != 0) {
// Draw a progressbar
- float barheight = rect.getHeight() / 16;
- float barpad_x = rect.getWidth() / 16;
- float barpad_y = rect.getHeight() / 16;
+ float barheight = static_cast<float>(rect.getHeight()) / 16;
+ float barpad_x = static_cast<float>(rect.getWidth()) / 16;
+ float barpad_y = static_cast<float>(rect.getHeight()) / 16;
core::rect<s32> progressrect(
rect.UpperLeftCorner.X + barpad_x,