Search game-dirs for entities.def files.

This commit is contained in:
Marco Cawthorne 2021-08-04 13:18:36 +02:00
parent 4e16e2dd49
commit b2af29f067
2 changed files with 5 additions and 3 deletions

View file

@ -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;

View file

@ -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();
}