Tweak the eclass loader, so mods can have proper custom entity definitions

This commit is contained in:
Marco Cawthorne 2021-03-04 05:01:15 +01:00
parent 1084517451
commit 535ff18f71

View file

@ -221,10 +221,10 @@ void EntityClassQuake3_Construct()
void visit(const char *name, const EntityClassScanner &table) const void visit(const char *name, const EntityClassScanner &table) const
{ {
Paths paths; Paths paths;
EntityClassQuake3_constructDirectory(baseDirectory, table.getExtension(), paths); if (!string_equal(baseDirectory, gameDirectory))
if (!string_equal(baseDirectory, gameDirectory)) {
EntityClassQuake3_constructDirectory(gameDirectory, table.getExtension(), paths); EntityClassQuake3_constructDirectory(gameDirectory, table.getExtension(), paths);
} else
EntityClassQuake3_constructDirectory(baseDirectory, table.getExtension(), paths);
for (Paths::iterator i = paths.begin(); i != paths.end(); ++i) { for (Paths::iterator i = paths.begin(); i != paths.end(); ++i) {
EntityClassesLoadFile(table, (*i).second)((*i).first.c_str()); EntityClassesLoadFile(table, (*i).second)((*i).first.c_str());