From c86f0ba480bb148663d7233db0a0357154c874c0 Mon Sep 17 00:00:00 2001 From: Miran Date: Thu, 12 Sep 2024 22:34:56 +0200 Subject: [PATCH] Replaced default CLEO directory in start script opcodes. --- source/CCustomOpcodeSystem.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/CCustomOpcodeSystem.cpp b/source/CCustomOpcodeSystem.cpp index 830f32d3..615c73da 100644 --- a/source/CCustomOpcodeSystem.cpp +++ b/source/CCustomOpcodeSystem.cpp @@ -837,7 +837,7 @@ namespace CLEO { OPCODE_READ_PARAM_STRING(path); - auto filename = reinterpret_cast(thread)->ResolvePath(path, DIR_CLEO); // legacy: default search location is game\cleo directory + auto filename = reinterpret_cast(thread)->ResolvePath(path, Filepath_Cleo.c_str()); // legacy: default search location is game\cleo directory TRACE("[0A92] Starting new custom script %s from thread named %s", filename.c_str(), thread->GetName().c_str()); auto cs = new CCustomScript(filename.c_str(), false, thread); @@ -877,7 +877,7 @@ namespace CLEO { OPCODE_READ_PARAM_STRING(path); - auto filename = reinterpret_cast(thread)->ResolvePath(path, DIR_CLEO); // legacy: default search location is game\cleo directory + auto filename = reinterpret_cast(thread)->ResolvePath(path, Filepath_Cleo.c_str()); // legacy: default search location is game\cleo directory filename += ".cm"; // add custom mission extension TRACE("[0A94] Starting new custom mission %s from thread named %s", filename.c_str(), thread->GetName().c_str()); @@ -1832,7 +1832,7 @@ extern "C" CLEO::CRunningScript* WINAPI CLEO_CreateCustomScript(CLEO::CRunningScript* fromThread, const char *script_name, int label) { - auto filename = reinterpret_cast(fromThread)->ResolvePath(script_name, DIR_CLEO); // legacy: default search location is game\cleo directory + auto filename = reinterpret_cast(fromThread)->ResolvePath(script_name, Filepath_Cleo.c_str()); // legacy: default search location is game\cleo directory if (label != 0) // create from label {