diff --git a/.gitattributes b/.gitattributes index 2e62a4e59..b0121f508 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ +* text=auto *.cpp diff=cpp *.h diff=cpp diff --git a/.github/workflows/lua_lint.yml b/.github/workflows/lua_lint.yml index 738e5afff..82374193a 100644 --- a/.github/workflows/lua_lint.yml +++ b/.github/workflows/lua_lint.yml @@ -14,12 +14,13 @@ on: jobs: luacheck: name: "Builtin Luacheck and Unit Tests" - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - name: Install luarocks - run: | - sudo apt-get install luarocks -qyy + - uses: actions/checkout@v3 + - uses: leafo/gh-actions-lua@v9 + with: + luaVersion: "5.1.5" + - uses: leafo/gh-actions-luarocks@v4 - name: Install luarocks tools run: | diff --git a/builtin/game/knockback.lua b/builtin/game/knockback.lua index a95c43a47..fdf8008df 100644 --- a/builtin/game/knockback.lua +++ b/builtin/game/knockback.lua @@ -23,9 +23,8 @@ local function vector_absmax(v) end core.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, unused_dir, damage) - if player:get_hp() == 0 - or player:get_animation().range ~= "stand" then - return -- RIP or attached + if player:get_hp() == 0 then + return -- RIP end -- Server::handleCommand_Interact() adds eye offset to one but not the other diff --git a/multicraft.conf.example b/multicraft.conf.example index dc9918268..62a580226 100644 --- a/multicraft.conf.example +++ b/multicraft.conf.example @@ -1234,7 +1234,7 @@ # bind_address = # Disable to prevent clients that don't support protocol version 37 from connecting. -# enable_proto_compat = true +# enable_protocol_compat = true # Enable to disallow old clients from connecting. # Older clients are compatible in the sense that they will not crash when connecting diff --git a/src/client/renderingengine.cpp b/src/client/renderingengine.cpp index f1e0558c6..d1e402fd9 100644 --- a/src/client/renderingengine.cpp +++ b/src/client/renderingengine.cpp @@ -558,7 +558,7 @@ void RenderingEngine::_draw_load_screen(const std::wstring &text, float imgR = scale; #else float imgRatio = (float) img_size.Height / img_size.Width; - u32 imgW = npot2(screensize.X / 2.0f); + u32 imgW = npot2(screensize.X / 2); if (imgW > (screensize.X * 0.7) && imgW >= 1024) imgW /= 2; u32 imgH = imgW * imgRatio; @@ -608,7 +608,7 @@ void RenderingEngine::_draw_load_screen(const std::wstring &text, core::rect(507, 24, 508, 40) }; - for (const auto & i : rects) { + for (const auto &i : rects) { const s32 clipx = (percent * imgW) / 100; core::rect r( MYMIN(i.UpperLeftCorner.X * imgR, clipx), i.UpperLeftCorner.Y * imgR, @@ -616,12 +616,12 @@ void RenderingEngine::_draw_load_screen(const std::wstring &text, ); if (r.getArea() <= 0) break; - get_video_driver()->draw2DRectangle( + driver->draw2DRectangle( video::SColor(255, 255 - percent * 2, percent * 2, 25), r + img_pos, nullptr); } - draw2DImageFilterScaled(get_video_driver(), progress_img, + draw2DImageFilterScaled(driver, progress_img, core::rect(img_pos.X, img_pos.Y, img_pos.X + (percent * imgW) / 100, img_pos.Y + imgH), @@ -633,7 +633,7 @@ void RenderingEngine::_draw_load_screen(const std::wstring &text, } guienv->drawAll(); - get_video_driver()->endScene(); + driver->endScene(); guitext->remove(); } @@ -825,7 +825,8 @@ v2u32 RenderingEngine::getDisplaySize() #else // __ANDROID__/__IOS__ float RenderingEngine::getDisplayDensity() { - return porting::getDisplayDensity(); + static const float density = porting::getDisplayDensity(); + return density; } v2u32 RenderingEngine::getDisplaySize() diff --git a/src/client/tile.cpp b/src/client/tile.cpp index 97ced0b62..2e3f97056 100644 --- a/src/client/tile.cpp +++ b/src/client/tile.cpp @@ -1068,13 +1068,6 @@ video::IImage * Align2Npot2(video::IImage * image, if (dim.Width == width) return image; -#ifdef __IOS__ - if (height > 64 || width > 64) { - height /= 2; - width /= 2; - } -#endif - video::IImage *targetimage = driver->createImage(video::ECF_A8R8G8B8, core::dimension2d(width, height)); diff --git a/textures/base/pack/creative_bg.png b/textures/base/pack/creative_bg.png index 102ae2e94..0e5026ede 100644 Binary files a/textures/base/pack/creative_bg.png and b/textures/base/pack/creative_bg.png differ diff --git a/textures/base/pack/creative_bg_ru.png b/textures/base/pack/creative_bg_ru.png index da8f2a4d6..3a308d263 100644 Binary files a/textures/base/pack/creative_bg_ru.png and b/textures/base/pack/creative_bg_ru.png differ diff --git a/textures/base/pack/creative_checkbox.png b/textures/base/pack/creative_checkbox.png index 910510b72..aed949949 100644 Binary files a/textures/base/pack/creative_checkbox.png and b/textures/base/pack/creative_checkbox.png differ