From e785adc56060bd3da8deb0cfb2d1c3fad795b5fc Mon Sep 17 00:00:00 2001 From: Unreal Karaulov Date: Fri, 20 Dec 2024 14:36:14 +0300 Subject: [PATCH] Remove debug lines --- src/bsp/Bsp.cpp | 7 ------- src/editor/Gui.cpp | 2 +- src/util/util.cpp | 14 -------------- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/bsp/Bsp.cpp b/src/bsp/Bsp.cpp index f1c989b9..76ec226b 100644 --- a/src/bsp/Bsp.cpp +++ b/src/bsp/Bsp.cpp @@ -5744,15 +5744,8 @@ void Bsp::reload_ents() { for (size_t i = 0; i < ents.size(); i++) delete ents[i]; - std::ofstream entFile("ent1.ent", std::ios::trunc); - if (entFile && bsp_header.lump[LUMP_ENTITIES].nLength > 0) - { - std::string entities = std::string(lumps[LUMP_ENTITIES].data(), lumps[LUMP_ENTITIES].data() + bsp_header.lump[LUMP_ENTITIES].nLength - 1); - entFile.write(entities.c_str(), entities.size()); - } ents = load_ents(std::string((char*)lumps[LUMP_ENTITIES].data(), (char*)lumps[LUMP_ENTITIES].data() + bsp_header.lump[LUMP_ENTITIES].nLength), bsp_name); update_ent_lump(); - export_entities("ent2.ent"); } void Bsp::print_stat(const std::string& name, unsigned int val, unsigned int max, bool isMem) diff --git a/src/editor/Gui.cpp b/src/editor/Gui.cpp index 785aaef9..ffd2e3a6 100644 --- a/src/editor/Gui.cpp +++ b/src/editor/Gui.cpp @@ -8232,7 +8232,7 @@ void Gui::drawKeyvalueEditor_RawEditTab(int entIdx) ent->addKeyvalue(keyName, ""); map->getBspRender()->refreshEnt(entIdx); keyName.clear(); - map->getBspRender()->pushUndoState("TESTA!", FL_ENTITIES); + map->getBspRender()->pushEntityUndoStateDelay("Add Keyvalue"); } } ImGui::SameLine(); diff --git a/src/util/util.cpp b/src/util/util.cpp index 0e66eab5..055a8495 100644 --- a/src/util/util.cpp +++ b/src/util/util.cpp @@ -3005,24 +3005,10 @@ std::vector load_ents(const std::string& entLump, const std::string& ma } if (lastBracket == 0 && ent) // currently defining an entity { - bool foundLine = false; - if (line.find("new") != std::string::npos) - { - foundLine = true; - print_log("Found line {}\n", line); - } Keyvalues k(line); - if (foundLine) - { - print_log("After read {}\n", line); - } for (size_t i = 0; i < k.keys.size(); i++) { - if (foundLine) - { - print_log("Key {} val {}\n", k.keys[i], k.values[i]); - } ent->addKeyvalue(k.keys[i], k.values[i], true); }