From 8b8776cbd7f7f346e16adc26b129e5997373aec9 Mon Sep 17 00:00:00 2001 From: maelstrom Date: Wed, 23 Jul 2025 03:05:32 +0200 Subject: [PATCH] fix(part): temporarily soft-disabled wedges as they crash the engine currently --- core/src/objects/part/wedgepart.cpp | 3 ++- core/src/objects/part/wedgepart.h | 2 +- editor/panes/explorerview.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/objects/part/wedgepart.cpp b/core/src/objects/part/wedgepart.cpp index a5ff599..6623e45 100644 --- a/core/src/objects/part/wedgepart.cpp +++ b/core/src/objects/part/wedgepart.cpp @@ -13,6 +13,7 @@ WedgePart::WedgePart(PartConstructParams params): BasePart(&TYPE, params) { } void WedgePart::updateCollider(rp::PhysicsCommon* common) { + Logger::fatalError("Wedges are currently disabled! Please do not use them or your editor may crash\n"); rp::ConvexMeshShape* shape = common->createConvexMeshShape(wedgePhysMesh, glmToRp(size * glm::vec3(0.5f))); // Recreate the rigidbody if the shape changes @@ -87,5 +88,5 @@ void WedgePart::createWedgeShape(rp::PhysicsCommon* common) { // Create the convex mesh std::vector messages; - wedgePhysMesh = common->createConvexMesh(polygonVertexArray, messages); + // wedgePhysMesh = common->createConvexMesh(polygonVertexArray, messages); } \ No newline at end of file diff --git a/core/src/objects/part/wedgepart.h b/core/src/objects/part/wedgepart.h index f5c8e42..b96f3be 100644 --- a/core/src/objects/part/wedgepart.h +++ b/core/src/objects/part/wedgepart.h @@ -3,7 +3,7 @@ #include "basepart.h" #include "objects/annotation.h" -class DEF_INST WedgePart : public BasePart { +class DEF_INST_(hidden) WedgePart : public BasePart { AUTOGEN_PREAMBLE protected: diff --git a/editor/panes/explorerview.cpp b/editor/panes/explorerview.cpp index 167bb65..de23d41 100644 --- a/editor/panes/explorerview.cpp +++ b/editor/panes/explorerview.cpp @@ -107,7 +107,7 @@ void ExplorerView::buildContextMenu() { contextMenu.addMenu(insertObjectMenu); for (const auto& [_, type] : INSTANCE_MAP) { - if (type->flags & INSTANCE_NOTCREATABLE || !type->constructor) continue; + if (type->flags & (INSTANCE_NOTCREATABLE | INSTANCE_HIDDEN) || !type->constructor) continue; QAction* instAction = new QAction(model.iconOf(type), QString::fromStdString(type->className)); insertObjectMenu->addAction(instAction);