mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
Merge pull request #1013 from MihailRis/patch-0.32.1
Some checks are pending
x86-64 AppImage / build-appimage (ubuntu-22.04) (push) Waiting to run
Build / Build (push) Waiting to run
Macos Build / build-dmg (push) Waiting to run
Windows Build (CLang) / build-windows (clang, windows-latest) (push) Waiting to run
MSVC Build / build-windows (windows-2022) (push) Waiting to run
Some checks are pending
x86-64 AppImage / build-appimage (ubuntu-22.04) (push) Waiting to run
Build / Build (push) Waiting to run
Macos Build / build-dmg (push) Waiting to run
Windows Build (CLang) / build-windows (clang, windows-latest) (push) Waiting to run
MSVC Build / build-windows (windows-2022) (push) Waiting to run
0.32.1 patch
This commit is contained in:
commit
99a62710b8
7 changed files with 24 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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*.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -216,6 +216,9 @@
|
|||
> [!WARNING]
|
||||
> Расположение инвентарей управляется движком и не может быть изменено свойствами pos, margin и т.д.
|
||||
|
||||
> [!WARNING]
|
||||
> Слоты без привязки к инвентарю не будут отображаться. Под приязкой к инвентарю понимается связь UI элемента inventory с инвентарём по id. Которая может быть явно создана через `inventory_ui.inventory = inventory_id`. [(см ui.md)](scripting/ui.md#инвентарь-inventory)
|
||||
|
||||
## Одиночный слот - *slot*
|
||||
|
||||
Элемент должен находиться внутри `inventory` элемента, без посредников.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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<RendererJob, RendererResult> {
|
||||
BlocksRenderer renderer;
|
||||
|
|
@ -197,8 +197,7 @@ void ChunksRenderer::update() {
|
|||
|
||||
int loadDistance = settings.chunks.loadDistance.get();
|
||||
|
||||
const int topN = 10;
|
||||
int top = std::min<int>(meshBuildQueue.size(), topN);
|
||||
int top = std::min<int>(meshBuildQueue.size(), MAX_CHUNKS_ENQUEUED_IN_FRAME);
|
||||
for (int i = 0; i < top; i++) {
|
||||
glm::ivec2 offset = meshBuildQueue[i];
|
||||
size_t index =
|
||||
|
|
|
|||
|
|
@ -328,14 +328,17 @@ void Entities::preparePhysics(float delta) {
|
|||
auto view = registry->view<EntityId, Rigidbody>();
|
||||
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<float>::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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue