diff --git a/src/bsp/Bsp.cpp b/src/bsp/Bsp.cpp index 145557ac..392126a8 100644 --- a/src/bsp/Bsp.cpp +++ b/src/bsp/Bsp.cpp @@ -826,7 +826,7 @@ std::vector Bsp::getScalableTexinfos(int modelIdx) bool Bsp::vertex_manipulation_sync(int modelIdx, const std::vector& hullVerts, bool convexCheckOnly) { - if (modelIdx < 0) + if (modelIdx < 0 || hullVerts.size() < 4) return false; std::set affectedPlanes; diff --git a/src/editor/Renderer.cpp b/src/editor/Renderer.cpp index 0b095afb..450a76cd 100644 --- a/src/editor/Renderer.cpp +++ b/src/editor/Renderer.cpp @@ -575,31 +575,20 @@ void Renderer::renderLoop() } } - modelUsesSharedStructures = modelIdx == 0 || modelIdx > 0 && SelectedMap->does_model_use_shared_structures(modelIdx); + modelUsesSharedStructures = modelIdx > 0 && SelectedMap->does_model_use_shared_structures(modelIdx); isScalingObject = transformMode == TRANSFORM_MODE_SCALE && transformTarget == TRANSFORM_OBJECT; isMovingOrigin = transformMode == TRANSFORM_MODE_MOVE && transformTarget == TRANSFORM_ORIGIN && modelIdx >= 0; isTransformingValid = (!modelUsesSharedStructures || (transformMode == TRANSFORM_MODE_MOVE && transformTarget != TRANSFORM_VERTEX)) || (isTransformableSolid && isScalingObject); - isTransformingWorld = ent && ent->isWorldSpawn() && transformTarget != TRANSFORM_OBJECT; + isTransformingWorld = modelIdx == 0 || ent && ent->isWorldSpawn(); if (ent && modelIdx < 0) invalidSolid = false; + else if (modelIdx == 0) + invalidSolid = false; else - { - invalidSolid = !modelVerts.size() || !SelectedMap->vertex_manipulation_sync(modelIdx, modelVerts, false); - if (!invalidSolid) - { - std::vector tmpVerts; - SelectedMap->getModelPlaneIntersectVerts(modelIdx, tmpVerts); // for vertex manipulation + scaling - - Solid modelSolid; - if (!getModelSolid(tmpVerts, SelectedMap, modelSolid)) - { - invalidSolid = true; - } - } - } + invalidSolid = !SelectedMap->vertex_manipulation_sync(modelIdx, modelVerts, false); } setupView();