Merge pull request #1013 from MihailRis/patch-0.32.1
Some checks failed
x86-64 AppImage / build-appimage (ubuntu-22.04) (push) Has been cancelled
Build / Build (push) Has been cancelled
Macos Build / build-dmg (push) Has been cancelled
Windows Build (CLang) / build-windows (clang, windows-latest) (push) Has been cancelled
MSVC Build / build-windows (windows-2022) (push) Has been cancelled

0.32.1 patch
This commit is contained in:
MihailRis 2026-10-05 23:18:48 +03:00 • committed by GitHub
commit 99a62710b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 24 additions and 12 deletions

View file

@ -185,9 +185,11 @@ rig:index(name: str) -> int
-- or the skeleton if no index is specified -- or the skeleton if no index is specified
rig:is_visible([optional] index: int) -> bool rig:is_visible([optional] index: int) -> bool
-- Sets the visibility status of the skeleton
rig:set_visible(status: bool)
-- Sets the visibility status of a bone by index -- Sets the visibility status of a bone by index
-- or the skeleton if no index is specified rig:set_visible(index: int, status: bool)
rig:set_visible([optional] index: int, status: bool)
-- Returns the color of the entity -- Returns the color of the entity
rig:get_color() -> vec4 rig:get_color() -> vec4

View file

@ -215,6 +215,9 @@ Element is a container. Does not have specific attributes.
> [!WARNING] > [!WARNING]
> Inventories position is controlled by the engine and can not be changed by attributes *pos* and *margin* > Inventories position is controlled by the engine and can not be changed by attributes *pos* and *margin*
> [!WARNING]
> Slots not linked to an inventory will not be displayed. "Linked to an inventory" refers to the association between an inventory UI element and an inventory via an ID. This link can be explicitly established using `inventory_ui.inventory = inventory_id`. [(see ui.md)](scripting/ui.md#inventory)
## *slot* ## *slot*
Element must be in direct sub-element of *inventory*. Element must be in direct sub-element of *inventory*.

View file

@ -174,9 +174,11 @@ rig:index(name: str) -> int
-- или всего скелета, если индекс не указан -- или всего скелета, если индекс не указан
rig:is_visible([optional] index: int) -> bool rig:is_visible([optional] index: int) -> bool
-- Устанавливает статус видимости всего скелета
rig:set_visible(status: bool)
-- Устанавливает статус видимости кости по индексу -- Устанавливает статус видимости кости по индексу
-- или всего скелета, если индекс не указан rig:set_visible(index: int, status: bool)
rig:set_visible([optional] index: int, status: bool)
-- Возвращает цвет сущности -- Возвращает цвет сущности
rig:get_color() -> vec4 rig:get_color() -> vec4

View file

@ -216,6 +216,9 @@
> [!WARNING] > [!WARNING]
> Расположение инвентарей управляется движком и не может быть изменено свойствами pos, margin и т.д. > Расположение инвентарей управляется движком и не может быть изменено свойствами pos, margin и т.д.
> [!WARNING]
> Слоты без привязки к инвентарю не будут отображаться. Под приязкой к инвентарю понимается связь UI элемента inventory с инвентарём по id. Которая может быть явно создана через `inventory_ui.inventory = inventory_id`. [(см ui.md)](scripting/ui.md#инвентарь-inventory)
## Одиночный слот - *slot* ## Одиночный слот - *slot*
Элемент должен находиться внутри `inventory` элемента, без посредников. Элемент должен находиться внутри `inventory` элемента, без посредников.

View file

@ -18,12 +18,12 @@ local curve_to_interp = {
local function parse_configure(raw_track, node) local function parse_configure(raw_track, node)
if node.fps then if node.fps then
raw_track.fps = node.fps raw_track.fps = tonumber(node.fps)
end end
if node.frames then if node.frames then
raw_track.duration = node.frames / (node.fps or DEFAULT_FPS) raw_track.duration = tonumber(node.frames) / (tonumber(raw_track.fps) or DEFAULT_FPS)
elseif node.duration then elseif node.duration then
raw_track.duration = node.duration raw_track.duration = tonumber(node.duration)
end end
raw_track.rotation_order = string.upper(node["rotation-order"] or "XYZ") raw_track.rotation_order = string.upper(node["rotation-order"] or "XYZ")
end end

View file

@ -22,7 +22,7 @@ static debug::Logger logger("chunks-render");
size_t ChunksRenderer::visibleChunks = 0; size_t ChunksRenderer::visibleChunks = 0;
static constexpr inline size_t MAX_CHUNKS_ENQUEUED_IN_FRAME = 4; static constexpr inline size_t MAX_CHUNKS_ENQUEUED_IN_FRAME = 64;
class RendererWorker : public util::Worker<RendererJob, RendererResult> { class RendererWorker : public util::Worker<RendererJob, RendererResult> {
BlocksRenderer renderer; BlocksRenderer renderer;
@ -197,8 +197,7 @@ void ChunksRenderer::update() {
int loadDistance = settings.chunks.loadDistance.get(); int loadDistance = settings.chunks.loadDistance.get();
const int topN = 10; int top = std::min<int>(meshBuildQueue.size(), MAX_CHUNKS_ENQUEUED_IN_FRAME);
int top = std::min<int>(meshBuildQueue.size(), topN);
for (int i = 0; i < top; i++) { for (int i = 0; i < top; i++) {
glm::ivec2 offset = meshBuildQueue[i]; glm::ivec2 offset = meshBuildQueue[i];
size_t index = size_t index =

View file

@ -328,14 +328,17 @@ void Entities::preparePhysics(float delta) {
auto view = registry->view<EntityId, Rigidbody>(); auto view = registry->view<EntityId, Rigidbody>();
for (auto [entity, eid, rigidbody] : view.each()) { for (auto [entity, eid, rigidbody] : view.each()) {
auto bodyType = rigidbody.hitbox.type; auto bodyType = rigidbody.hitbox.type;
if (eid.destroyFlag || !rigidbody.enabled || bodyType == BodyType::STATIC) { if (eid.destroyFlag || !rigidbody.enabled) {
continue; continue;
} }
rigidbody.hitbox.selectable = rigidbody.selectable;
rigidbody.hitbox.mass = bodyType == BodyType::DYNAMIC rigidbody.hitbox.mass = bodyType == BodyType::DYNAMIC
? rigidbody.mass ? rigidbody.mass
: std::numeric_limits<float>::infinity(); : std::numeric_limits<float>::infinity();
rigidbody.hitbox.elasticity = rigidbody.elasticity; rigidbody.hitbox.elasticity = rigidbody.elasticity;
rigidbody.hitbox.selectable = rigidbody.selectable; if (bodyType == BodyType::STATIC) {
continue;
}
hitboxes.emplace_back(&rigidbody.hitbox); hitboxes.emplace_back(&rigidbody.hitbox);
if (!eid.def.solid) { if (!eid.def.solid) {
continue; continue;