Skip to content

Commit

Permalink
HACK: don't call recalculateBrushWindings for hot-reload diffs.
Browse files Browse the repository at this point in the history
  • Loading branch information
stgatilov committed Aug 6, 2021
1 parent a4c0d36 commit d8e549a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/dm.gameconnection/GameConnection.cpp
Expand Up @@ -748,6 +748,9 @@ std::string saveMapDiff(const DiffEntityStatuses& entityStatuses)
{
registry::ScopedKeyChanger progressDisabler(RKEY_MAP_SUPPRESS_LOAD_STATUS_DIALOG, true);

// Hack: disable recalculateBrushWindings for this export
registry::ScopedKeyChanger<std::string> guard("MapExporter_recalculateBrushWindings_ignore", "yes");

// Get a scoped exporter class
auto exporter = GlobalMapModule().createMapExporter(writer, root, outStream);
exporter->exportMap(root, scene::traverseSubset(subsetNodes));
Expand Down
6 changes: 6 additions & 0 deletions radiantcore/map/algorithm/MapExporter.cpp
Expand Up @@ -290,6 +290,12 @@ void MapExporter::finishScene()

void MapExporter::recalculateBrushWindings()
{
if (registry::getValue<std::string>("MapExporter_recalculateBrushWindings_ignore") == "yes")
{
// stgatilov: Hack to disable recalculateBrushWindings for hot-reload diffs
return;
}

_root->foreachNode([] (const scene::INodePtr& child)->bool
{
auto* brush = Node_getIBrush(child);
Expand Down

0 comments on commit d8e549a

Please sign in to comment.