Skip to content

Commit

Permalink
Fix model export
Browse files Browse the repository at this point in the history
Fix model export
 #52
  • Loading branch information
Karaulov committed Dec 18, 2022
1 parent 97d852c commit c79d223
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/editor/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ void ExportModel(Bsp* map, int id, int ExportType)
while (tmpMap->models[0].nVisLeafs >= tmpMap->leafCount)
tmpMap->create_leaf(CONTENTS_EMPTY);

tmpMap->models[0].nVisLeafs = tmpMap->leafCount - 1;

tmpMap->move(-modelOrigin, 0, true, true);

Expand All @@ -513,7 +514,7 @@ void ExportModel(Bsp* map, int id, int ExportType)
{
tmpMap->update_ent_lump();
tmpMap->update_lump_pointers();
tmpMap->write(GetWorkDir() + "model" + std::to_string(id) + "(test1).bsp");
tmpMap->write(GetWorkDir() + "_" + map->bsp_name + "_model" + std::to_string(id) + ".bsp");
}
}

Expand Down

0 comments on commit c79d223

Please sign in to comment.