core/metamod_console.cpp
changeset 714 966f819588a2
parent 705 a1001281dcb1
child 725 9eec529c3caa
     1.1 --- a/core/metamod_console.cpp	Sun May 16 23:21:08 2010 -0400
     1.2 +++ b/core/metamod_console.cpp	Wed May 19 01:28:55 2010 -0500
     1.3 @@ -2,7 +2,7 @@
     1.4   * vim: set ts=4 sw=4 tw=99 noet :
     1.5   * ======================================================
     1.6   * Metamod:Source
     1.7 - * Copyright (C) 2004-2009 AlliedModders LLC and authors.
     1.8 + * Copyright (C) 2004-2010 AlliedModders LLC and authors.
     1.9   * All rights reserved.
    1.10   * ======================================================
    1.11   *
    1.12 @@ -416,27 +416,7 @@
    1.13  					file = alias;
    1.14  				}
    1.15  
    1.16 -				if (file[0] == '/' || strcmp(&(file[1]), ":\\") == 0)
    1.17 -				{
    1.18 -					g_Metamod.PathFormat(full_path, sizeof(full_path), "%s", file);
    1.19 -				}
    1.20 -				else
    1.21 -				{
    1.22 -					const char *ext = UTIL_GetExtension(file);
    1.23 -#if defined WIN32 || defined _WIN32
    1.24 -					ext = ext ? "" : ".dll";
    1.25 -#elif defined __APPLE__
    1.26 -					ext = ext ? "" : ".dylib";
    1.27 -#else
    1.28 -					ext = ext ? "" : "_i486.so";
    1.29 -#endif
    1.30 -					g_Metamod.PathFormat(full_path,
    1.31 -						sizeof(full_path),
    1.32 -						"%s/%s%s",
    1.33 -						g_Metamod.GetBaseDir(),
    1.34 -						file,
    1.35 -						ext);
    1.36 -				}
    1.37 +				g_Metamod.GetFullPluginPath(file, full_path, sizeof(full_path));
    1.38  
    1.39  				char error[255]={0};
    1.40  				bool already;
    1.41 @@ -539,28 +519,7 @@
    1.42  						file = alias;
    1.43  					}
    1.44  
    1.45 -					/* first check if it's a known filename */
    1.46 -					if (file[0] == '/' || strcmp(&(file[1]), ":\\") == 0)
    1.47 -					{
    1.48 -						g_Metamod.PathFormat(full_path, sizeof(full_path), "%s", file);
    1.49 -					}
    1.50 -					else
    1.51 -					{
    1.52 -						const char *ext = UTIL_GetExtension(file);
    1.53 -#if defined WIN32 || defined _WIN32
    1.54 -						ext = ext ? "" : ".dll";
    1.55 -#elif defined __APPLE__
    1.56 -						ext = ext ? "" : ".dylib";
    1.57 -#else
    1.58 -						ext = ext ? "" : "_i486.so";
    1.59 -#endif
    1.60 -						g_Metamod.PathFormat(full_path,
    1.61 -							sizeof(full_path),
    1.62 -							"%s/%s%s",
    1.63 -							g_Metamod.GetBaseDir(),
    1.64 -							file,
    1.65 -							ext);
    1.66 -					}
    1.67 +					g_Metamod.GetFullPluginPath(file, full_path, sizeof(full_path));
    1.68  
    1.69  					List<CPluginManager::CPlugin *>::iterator iter, end;
    1.70  					CPluginManager::CPlugin *pl;