Skip to content

Commit

Permalink
Remove debug lines
Browse files Browse the repository at this point in the history
  • Loading branch information
UnrealKaraulov committed Dec 20, 2024
1 parent e0cd97c commit e785adc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
7 changes: 0 additions & 7 deletions src/bsp/Bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/editor/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
14 changes: 0 additions & 14 deletions src/util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3005,24 +3005,10 @@ std::vector<Entity*> 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);
}

Expand Down

0 comments on commit e785adc

Please sign in to comment.