diff --git a/imgui b/imgui index 4df57136..231cbee0 160000 --- a/imgui +++ b/imgui @@ -1 +1 @@ -Subproject commit 4df57136e9832327c11e48b5bfe00b0326bd5b63 +Subproject commit 231cbee0fc4f59dbe5b8b853a11b08dc84e57c65 diff --git a/src/bsp/Bsp.cpp b/src/bsp/Bsp.cpp index 4f56c746..1c8303aa 100644 --- a/src/bsp/Bsp.cpp +++ b/src/bsp/Bsp.cpp @@ -2851,7 +2851,7 @@ bool Bsp::downscale_texture(int textureId, int maxDim) { return false; } - downscale_texture(textureId, newWidth, newHeight); + return downscale_texture(textureId, newWidth, newHeight); } void Bsp::downscale_invalid_textures() { @@ -3543,6 +3543,15 @@ bool Bsp::validate() { isValid = false; } } + + if (nodes[i].nMins[0] > nodes[i].nMaxs[0] || + nodes[i].nMins[1] > nodes[i].nMaxs[1] || + nodes[i].nMins[2] > nodes[i].nMaxs[2]) { + logf("Backwards mins/maxs in node %d. Mins: (%d, %d, %d) Maxs: (%d %d %d)\n", i, + (int)nodes[i].nMins[0], (int)nodes[i].nMins[1], (int)nodes[i].nMins[2], + (int)nodes[i].nMaxs[0], (int)nodes[i].nMaxs[1], (int)nodes[i].nMaxs[2]); + isValid = false; + } } for (int i = 0; i < planeCount; i++) { BSPPLANE& plane = planes[i]; diff --git a/src/editor/Gui.cpp b/src/editor/Gui.cpp index a2f1689c..194f86c7 100644 --- a/src/editor/Gui.cpp +++ b/src/editor/Gui.cpp @@ -1840,13 +1840,7 @@ void Gui::drawKeyvalueEditor_SmartEditTab(Entity* ent) { string newVal = data->Buf; if (newVal.empty()) { - if (inputData->defaultValue.length()) { - ent->setOrAddKeyvalue(inputData->key, inputData->defaultValue); - } - else { - ent->removeKeyvalue(inputData->key); - } - + ent->removeKeyvalue(inputData->key); } else { ent->setOrAddKeyvalue(inputData->key, newVal); @@ -3283,7 +3277,8 @@ void Gui::drawEntityReport() { static vector visibleEnts; static vector selectedItems; - const ImGuiKeyModFlags expected_key_mod_flags = ImGui::GetMergedKeyModFlags(); + ImGuiIO& io = ImGui::GetIO(); + const ImGuiModFlags expected_key_mod_flags = io.KeyMods; int footerHeight = ImGui::GetFrameHeightWithSpacing() * 5 + 16; ImGui::BeginChild("entlist", ImVec2(0, -footerHeight)); @@ -3371,11 +3366,11 @@ void Gui::drawEntityReport() { string cname = ent->keyvalues["classname"]; if (ImGui::Selectable((cname + "##ent" + to_string(i)).c_str(), selectedItems[i], ImGuiSelectableFlags_AllowDoubleClick)) { - if (expected_key_mod_flags & ImGuiKeyModFlags_Ctrl) { + if (expected_key_mod_flags & ImGuiModFlags_Ctrl) { selectedItems[i] = !selectedItems[i]; lastSelect = i; } - else if (expected_key_mod_flags & ImGuiKeyModFlags_Shift) { + else if (expected_key_mod_flags & ImGuiModFlags_Shift) { if (lastSelect >= 0) { int begin = i > lastSelect ? lastSelect : i; int end = i > lastSelect ? i : lastSelect;