From b2af29f067c51dd95ebd78ca4a5182f1ee5d57c6 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Wed, 4 Aug 2021 13:18:36 +0200 Subject: [PATCH] Search game-dirs for entities.def files. --- src/eclass.cpp | 4 ++-- src/mainframe.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/eclass.cpp b/src/eclass.cpp index 5289804..64a90fb 100644 --- a/src/eclass.cpp +++ b/src/eclass.cpp @@ -206,8 +206,8 @@ void EntityClassQuake3_Construct() StringOutputStream gameDirectory(256); const char *basegame = GlobalRadiant().getRequiredGameDescriptionKeyValue("basegame"); const char *gamename = GlobalRadiant().getGameName(); - baseDirectory << GlobalRadiant().getGameToolsPath() << basegame << '/'; - gameDirectory << GlobalRadiant().getGameToolsPath() << gamename << '/'; + baseDirectory << GlobalRadiant().getEnginePath() << basegame << '/'; + gameDirectory << GlobalRadiant().getEnginePath() << gamename << '/'; class LoadEntityDefinitionsVisitor : public EClassModules::Visitor { const char *baseDirectory; diff --git a/src/mainframe.cpp b/src/mainframe.cpp index 7eb9641..a13e366 100644 --- a/src/mainframe.cpp +++ b/src/mainframe.cpp @@ -214,7 +214,9 @@ void EnginePath_Realise() const char *EnginePath_get() { - ASSERT_MESSAGE(g_enginepath_unrealised == 0, "EnginePath_get: engine path not realised"); + if (g_enginepath_unrealised == 0) { + g_enginePathObservers.realise(); + } return g_strEnginePath.c_str(); }