diff --git a/doc/en/scripting/ecs.md b/doc/en/scripting/ecs.md index 0473fc852..0968e2d8d 100644 --- a/doc/en/scripting/ecs.md +++ b/doc/en/scripting/ecs.md @@ -185,9 +185,11 @@ rig:index(name: str) -> int -- or the skeleton if no index is specified 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 --- or the skeleton if no index is specified -rig:set_visible([optional] index: int, status: bool) +rig:set_visible(index: int, status: bool) -- Returns the color of the entity rig:get_color() -> vec4 diff --git a/doc/en/xml-ui-layouts.md b/doc/en/xml-ui-layouts.md index 704a0b786..8d04ff4ec 100644 --- a/doc/en/xml-ui-layouts.md +++ b/doc/en/xml-ui-layouts.md @@ -215,6 +215,9 @@ Element is a container. Does not have specific attributes. > [!WARNING] > 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* Element must be in direct sub-element of *inventory*. diff --git a/doc/ru/scripting/ecs.md b/doc/ru/scripting/ecs.md index d6a823cf0..fb03721c6 100644 --- a/doc/ru/scripting/ecs.md +++ b/doc/ru/scripting/ecs.md @@ -174,9 +174,11 @@ rig:index(name: str) -> int -- или всего скелета, если индекс не указан rig:is_visible([optional] index: int) -> bool +-- Устанавливает статус видимости всего скелета +rig:set_visible(status: bool) + -- Устанавливает статус видимости кости по индексу --- или всего скелета, если индекс не указан -rig:set_visible([optional] index: int, status: bool) +rig:set_visible(index: int, status: bool) -- Возвращает цвет сущности rig:get_color() -> vec4 diff --git a/doc/ru/xml-ui-layouts.md b/doc/ru/xml-ui-layouts.md index 9be788e7f..94f396495 100644 --- a/doc/ru/xml-ui-layouts.md +++ b/doc/ru/xml-ui-layouts.md @@ -216,6 +216,9 @@ > [!WARNING] > Расположение инвентарей управляется движком и не может быть изменено свойствами pos, margin и т.д. +> [!WARNING] +> Слоты без привязки к инвентарю не будут отображаться. Под приязкой к инвентарю понимается связь UI элемента inventory с инвентарём по id. Которая может быть явно создана через `inventory_ui.inventory = inventory_id`. [(см ui.md)](scripting/ui.md#инвентарь-inventory) + ## Одиночный слот - *slot* Элемент должен находиться внутри `inventory` элемента, без посредников. diff --git a/res/modules/internal/formats/vca.lua b/res/modules/internal/formats/vca.lua index 4ecf4c895..c44d28904 100644 --- a/res/modules/internal/formats/vca.lua +++ b/res/modules/internal/formats/vca.lua @@ -18,12 +18,12 @@ local curve_to_interp = { local function parse_configure(raw_track, node) if node.fps then - raw_track.fps = node.fps + raw_track.fps = tonumber(node.fps) end 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 - raw_track.duration = node.duration + raw_track.duration = tonumber(node.duration) end raw_track.rotation_order = string.upper(node["rotation-order"] or "XYZ") end diff --git a/src/graphics/render/ChunksRenderer.cpp b/src/graphics/render/ChunksRenderer.cpp index 82a7fa6d6..6cccbe3fa 100644 --- a/src/graphics/render/ChunksRenderer.cpp +++ b/src/graphics/render/ChunksRenderer.cpp @@ -22,7 +22,7 @@ static debug::Logger logger("chunks-render"); 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 { BlocksRenderer renderer; @@ -197,8 +197,7 @@ void ChunksRenderer::update() { int loadDistance = settings.chunks.loadDistance.get(); - const int topN = 10; - int top = std::min(meshBuildQueue.size(), topN); + int top = std::min(meshBuildQueue.size(), MAX_CHUNKS_ENQUEUED_IN_FRAME); for (int i = 0; i < top; i++) { glm::ivec2 offset = meshBuildQueue[i]; size_t index = diff --git a/src/objects/Entities.cpp b/src/objects/Entities.cpp index c2ce479c6..46746684e 100644 --- a/src/objects/Entities.cpp +++ b/src/objects/Entities.cpp @@ -328,14 +328,17 @@ void Entities::preparePhysics(float delta) { auto view = registry->view(); for (auto [entity, eid, rigidbody] : view.each()) { auto bodyType = rigidbody.hitbox.type; - if (eid.destroyFlag || !rigidbody.enabled || bodyType == BodyType::STATIC) { + if (eid.destroyFlag || !rigidbody.enabled) { continue; } + rigidbody.hitbox.selectable = rigidbody.selectable; rigidbody.hitbox.mass = bodyType == BodyType::DYNAMIC ? rigidbody.mass : std::numeric_limits::infinity(); rigidbody.hitbox.elasticity = rigidbody.elasticity; - rigidbody.hitbox.selectable = rigidbody.selectable; + if (bodyType == BodyType::STATIC) { + continue; + } hitboxes.emplace_back(&rigidbody.hitbox); if (!eid.def.solid) { continue;