Minor changes and fixes
This commit is contained in:
parent
d48d6f8dc0
commit
2d0b2e7ea7
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1,2 +1,3 @@
|
|||||||
|
* text=auto
|
||||||
*.cpp diff=cpp
|
*.cpp diff=cpp
|
||||||
*.h diff=cpp
|
*.h diff=cpp
|
||||||
|
11
.github/workflows/lua_lint.yml
vendored
11
.github/workflows/lua_lint.yml
vendored
@ -14,12 +14,13 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
luacheck:
|
luacheck:
|
||||||
name: "Builtin Luacheck and Unit Tests"
|
name: "Builtin Luacheck and Unit Tests"
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Install luarocks
|
- uses: leafo/gh-actions-lua@v9
|
||||||
run: |
|
with:
|
||||||
sudo apt-get install luarocks -qyy
|
luaVersion: "5.1.5"
|
||||||
|
- uses: leafo/gh-actions-luarocks@v4
|
||||||
|
|
||||||
- name: Install luarocks tools
|
- name: Install luarocks tools
|
||||||
run: |
|
run: |
|
||||||
|
@ -23,9 +23,8 @@ local function vector_absmax(v)
|
|||||||
end
|
end
|
||||||
|
|
||||||
core.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, unused_dir, damage)
|
core.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, unused_dir, damage)
|
||||||
if player:get_hp() == 0
|
if player:get_hp() == 0 then
|
||||||
or player:get_animation().range ~= "stand" then
|
return -- RIP
|
||||||
return -- RIP or attached
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Server::handleCommand_Interact() adds eye offset to one but not the other
|
-- Server::handleCommand_Interact() adds eye offset to one but not the other
|
||||||
|
@ -1234,7 +1234,7 @@
|
|||||||
# bind_address =
|
# bind_address =
|
||||||
|
|
||||||
# Disable to prevent clients that don't support protocol version 37 from connecting.
|
# 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.
|
# Enable to disallow old clients from connecting.
|
||||||
# Older clients are compatible in the sense that they will not crash when connecting
|
# Older clients are compatible in the sense that they will not crash when connecting
|
||||||
|
@ -558,7 +558,7 @@ void RenderingEngine::_draw_load_screen(const std::wstring &text,
|
|||||||
float imgR = scale;
|
float imgR = scale;
|
||||||
#else
|
#else
|
||||||
float imgRatio = (float) img_size.Height / img_size.Width;
|
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)
|
if (imgW > (screensize.X * 0.7) && imgW >= 1024)
|
||||||
imgW /= 2;
|
imgW /= 2;
|
||||||
u32 imgH = imgW * imgRatio;
|
u32 imgH = imgW * imgRatio;
|
||||||
@ -608,7 +608,7 @@ void RenderingEngine::_draw_load_screen(const std::wstring &text,
|
|||||||
core::rect<s32>(507, 24, 508, 40)
|
core::rect<s32>(507, 24, 508, 40)
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const auto & i : rects) {
|
for (const auto &i : rects) {
|
||||||
const s32 clipx = (percent * imgW) / 100;
|
const s32 clipx = (percent * imgW) / 100;
|
||||||
core::rect<s32> r(
|
core::rect<s32> r(
|
||||||
MYMIN(i.UpperLeftCorner.X * imgR, clipx), i.UpperLeftCorner.Y * imgR,
|
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)
|
if (r.getArea() <= 0)
|
||||||
break;
|
break;
|
||||||
get_video_driver()->draw2DRectangle(
|
driver->draw2DRectangle(
|
||||||
video::SColor(255, 255 - percent * 2, percent * 2, 25),
|
video::SColor(255, 255 - percent * 2, percent * 2, 25),
|
||||||
r + img_pos, nullptr);
|
r + img_pos, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
draw2DImageFilterScaled(get_video_driver(), progress_img,
|
draw2DImageFilterScaled(driver, progress_img,
|
||||||
core::rect<s32>(img_pos.X, img_pos.Y,
|
core::rect<s32>(img_pos.X, img_pos.Y,
|
||||||
img_pos.X + (percent * imgW) / 100,
|
img_pos.X + (percent * imgW) / 100,
|
||||||
img_pos.Y + imgH),
|
img_pos.Y + imgH),
|
||||||
@ -633,7 +633,7 @@ void RenderingEngine::_draw_load_screen(const std::wstring &text,
|
|||||||
}
|
}
|
||||||
|
|
||||||
guienv->drawAll();
|
guienv->drawAll();
|
||||||
get_video_driver()->endScene();
|
driver->endScene();
|
||||||
guitext->remove();
|
guitext->remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -825,7 +825,8 @@ v2u32 RenderingEngine::getDisplaySize()
|
|||||||
#else // __ANDROID__/__IOS__
|
#else // __ANDROID__/__IOS__
|
||||||
float RenderingEngine::getDisplayDensity()
|
float RenderingEngine::getDisplayDensity()
|
||||||
{
|
{
|
||||||
return porting::getDisplayDensity();
|
static const float density = porting::getDisplayDensity();
|
||||||
|
return density;
|
||||||
}
|
}
|
||||||
|
|
||||||
v2u32 RenderingEngine::getDisplaySize()
|
v2u32 RenderingEngine::getDisplaySize()
|
||||||
|
@ -1068,13 +1068,6 @@ video::IImage * Align2Npot2(video::IImage * image,
|
|||||||
if (dim.Width == width)
|
if (dim.Width == width)
|
||||||
return image;
|
return image;
|
||||||
|
|
||||||
#ifdef __IOS__
|
|
||||||
if (height > 64 || width > 64) {
|
|
||||||
height /= 2;
|
|
||||||
width /= 2;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
video::IImage *targetimage =
|
video::IImage *targetimage =
|
||||||
driver->createImage(video::ECF_A8R8G8B8,
|
driver->createImage(video::ECF_A8R8G8B8,
|
||||||
core::dimension2d<u32>(width, height));
|
core::dimension2d<u32>(width, height));
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 704 B After Width: | Height: | Size: 818 B |
Binary file not shown.
Before Width: | Height: | Size: 790 B After Width: | Height: | Size: 944 B |
Binary file not shown.
Before Width: | Height: | Size: 172 B After Width: | Height: | Size: 171 B |
Loading…
x
Reference in New Issue
Block a user