From 2fc27c4ff39543e4158ed79ee490b0ddbc83d516 Mon Sep 17 00:00:00 2001 From: wootguy Date: Tue, 23 Apr 2024 09:34:26 -0700 Subject: [PATCH] fix missing entity classes depending on FGD order (fixes #48) 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. --- src/editor/Fgd.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/editor/Fgd.cpp b/src/editor/Fgd.cpp index 3aaa1aa3..62a517f6 100644 --- a/src/editor/Fgd.cpp +++ b/src/editor/Fgd.cpp @@ -52,6 +52,7 @@ void Fgd::merge(Fgd* other) { classMap[className] = newClass; } + createEntGroups(); sortClasses(); } @@ -458,6 +459,9 @@ void Fgd::createEntGroups() { set addedPointGroups; set 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;