diff -r be04fd67923b -r 783e91c5f445 core-legacy/CSmmAPI.cpp --- a/core-legacy/CSmmAPI.cpp Sun Nov 23 21:21:49 2008 -0600 +++ b/core-legacy/CSmmAPI.cpp Sun Nov 23 21:22:04 2008 -0600 @@ -460,11 +460,12 @@ } } - const char *usepath = g_SmmPath.c_str(); - if (UTIL_Relatize(rel_path, sizeof(rel_path), engine_file, g_SmmPath.c_str())) - { + char our_path[PATH_SIZE]; + GetFileOfAddress((void*)LoadAsGameDLL, our_path, sizeof(our_path)); + + const char *usepath = our_path; + if (UTIL_Relatize(rel_path, sizeof(rel_path), engine_file, our_path)) usepath = rel_path; - } char command[PATH_SIZE * 2]; g_VspListener.SetLoadable(true); @@ -475,7 +476,7 @@ void CSmmAPI::EnableVSPListener() { /* If GameInit already passed and we're not already enabled or loaded, go ahead and LoadAsVSP load */ - if (bGameInit && !m_VSP && !g_VspListener.IsLoaded() && !g_bIsBridgedAsVsp) + if (g_bGameInit && !m_VSP && !g_VspListener.IsLoaded() && !g_bIsBridgedAsVsp) { LoadAsVSP(); }