1.1 --- a/core/metamod.cpp Sat Nov 15 23:46:27 2008 -0600
1.2 +++ b/core/metamod.cpp Sun Nov 16 03:41:17 2008 -0600
1.3 @@ -516,7 +516,7 @@
1.4 fp = fopen(_file, "rt");
1.5 if (!fp)
1.6 {
1.7 - LogMessage("[META] Could not open plugins file %s\n", _file);
1.8 + mm_LogMessage("[META] Could not open plugins file %s\n", _file);
1.9 return -1;
1.10 }
1.11
1.12 @@ -590,18 +590,14 @@
1.13 id = g_PluginMngr.Load(file, Pl_File, already, error, sizeof(error));
1.14 if (id < Pl_MinId || g_PluginMngr.FindById(id)->m_Status < Pl_Paused)
1.15 {
1.16 - LogMessage("[META] Failed to load plugin %s. %s", buffer, error);
1.17 + mm_LogMessage("[META] Failed to load plugin %s. %s", buffer, error);
1.18 }
1.19 else
1.20 {
1.21 if (already)
1.22 - {
1.23 skipped++;
1.24 - }
1.25 else
1.26 - {
1.27 total++;
1.28 - }
1.29 }
1.30 }
1.31 else
1.32 @@ -626,31 +622,23 @@
1.33 id = g_PluginMngr.Load(full_path, Pl_File, already, error, sizeof(error));
1.34 if (id < Pl_MinId || g_PluginMngr.FindById(id)->m_Status < Pl_Paused)
1.35 {
1.36 - LogMessage("[META] Failed to load plugin %s. %s", buffer, error);
1.37 + mm_LogMessage("[META] Failed to load plugin %s. %s", buffer, error);
1.38 }
1.39 else
1.40 {
1.41 if (already)
1.42 - {
1.43 skipped++;
1.44 - }
1.45 else
1.46 - {
1.47 total++;
1.48 - }
1.49 }
1.50 }
1.51 }
1.52 fclose(fp);
1.53
1.54 if (skipped)
1.55 - {
1.56 - LogMessage("[META] Loaded %d plugins from file (%d already loaded)", total, skipped);
1.57 - }
1.58 + mm_LogMessage("[META] Loaded %d plugins from file (%d already loaded)", total, skipped);
1.59 else
1.60 - {
1.61 - LogMessage("[META] Loaded %d plugins from file.", total);
1.62 - }
1.63 + mm_LogMessage("[META] Loaded %d plugins from file.", total);
1.64
1.65 return total;
1.66 }
1.67 @@ -958,7 +946,7 @@
1.68 UTIL_FormatArgs(buffer, sizeof(buffer), msg, ap);
1.69 va_end(ap);
1.70
1.71 - LogMessage("[%s] %s", pl->GetLogTag(), buffer);
1.72 + mm_LogMessage("[%s] %s", pl->GetLogTag(), buffer);
1.73 }
1.74
1.75 CreateInterfaceFn MetamodSource::GetEngineFactory(bool syn/* =true */)
1.76 @@ -1434,20 +1422,14 @@
1.77 char alias[24], file[255], error[255];
1.78
1.79 if (!provider->ProcessVDF(path, file, sizeof(file), alias, sizeof(alias)))
1.80 - {
1.81 return;
1.82 - }
1.83
1.84 if (alias[0] != '\0')
1.85 - {
1.86 g_PluginMngr.SetAlias(alias, file);
1.87 - }
1.88
1.89 id = g_PluginMngr.Load(file, Pl_File, already, error, sizeof(error));
1.90 if (id < Pl_MinId || g_PluginMngr.FindById(id)->m_Status < Pl_Paused)
1.91 - {
1.92 - LogMessage("[META] Failed to load plugin %s: %s", file, error);
1.93 - }
1.94 + mm_LogMessage("[META] Failed to load plugin %s: %s", file, error);
1.95 }
1.96
1.97 static void
1.98 @@ -1472,7 +1454,7 @@
1.99 error,
1.100 sizeof(error),
1.101 NULL);
1.102 - LogMessage("[META] Could not open folder \"%s\" (%s)", dir, error);
1.103 + mm_LogMessage("[META] Could not open folder \"%s\" (%s)", dir, error);
1.104 return;
1.105 }
1.106
1.107 @@ -1499,7 +1481,7 @@
1.108
1.109 if ((pDir = opendir(dir)) == NULL)
1.110 {
1.111 - LogMessage("[META] Could not open folder \"%s\" (%s)", dir, strerror(errno));
1.112 + mm_LogMessage("[META] Could not open folder \"%s\" (%s)", dir, strerror(errno));
1.113 return;
1.114 }
1.115