Skip to content

Commit

Permalink
fix missing entity classes depending on FGD order (fixes #48)
Browse files Browse the repository at this point in the history
an FGD with fewer classes loaded first could prevent entire groups of classes not being selectable in the next FGD. An empty FGD loaded first would prevent any class being selectable.
  • Loading branch information
wootguy committed Apr 23, 2024
1 parent 400cafd commit 2fc27c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/editor/Fgd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ void Fgd::merge(Fgd* other) {
classMap[className] = newClass;
}

createEntGroups();
sortClasses();
}

Expand Down Expand Up @@ -458,6 +459,9 @@ void Fgd::createEntGroups() {
set<string> addedPointGroups;
set<string> addedSolidGroups;

pointEntGroups.clear();
solidEntGroups.clear();

for (int i = 0; i < classes.size(); i++) {
if (classes[i]->classType == FGD_CLASS_BASE || classes[i]->name == "worldspawn")
continue;
Expand Down

0 comments on commit 2fc27c4

Please sign in to comment.