core-legacy/concommands.cpp
changeset 714 966f819588a2
parent 689 4065ba5e9155
child 887 e30d4a37f5e5
     1.1 --- a/core-legacy/concommands.cpp	Sun May 16 23:21:08 2010 -0400
     1.2 +++ b/core-legacy/concommands.cpp	Wed May 19 01:28:55 2010 -0500
     1.3 @@ -1,5 +1,5 @@
     1.4  /* ======== SourceMM ========
     1.5 - * Copyright (C) 2004-2009 Metamod:Source Development Team
     1.6 + * Copyright (C) 2004-2010 Metamod:Source Development Team
     1.7   * No warranties of any kind
     1.8   *
     1.9   * License: zlib/libpng
    1.10 @@ -424,18 +424,7 @@
    1.11  					file = alias;
    1.12  				}
    1.13  
    1.14 -				if (file[0] == '/' || strcmp(&(file[1]), ":\\") == 0)
    1.15 -				{
    1.16 -					g_SmmAPI.PathFormat(full_path, sizeof(full_path), "%s", file);
    1.17 -				} else {
    1.18 -					const char *ext = UTIL_GetExtension(file);
    1.19 -#if defined WIN32 || defined _WIN32
    1.20 -					ext = ext ? "" : ".dll";
    1.21 -#else
    1.22 -					ext = ext ? "" : "_i486.so";
    1.23 -#endif
    1.24 -					g_SmmAPI.PathFormat(full_path, sizeof(full_path), "%s/%s%s", g_ModPath.c_str(), file, ext);
    1.25 -				}
    1.26 +				g_SmmAPI.GetFullPluginPath(file, full_path, sizeof(full_path));
    1.27  
    1.28  				char error[255]={0};
    1.29  				bool already;
    1.30 @@ -526,19 +515,7 @@
    1.31  						file = alias;
    1.32  					}
    1.33  
    1.34 -					/* first check if it's a known filename */
    1.35 -					if (file[0] == '/' || strcmp(&(file[1]), ":\\") == 0)
    1.36 -					{
    1.37 -						g_SmmAPI.PathFormat(full_path, sizeof(full_path), "%s", file);
    1.38 -					} else {
    1.39 -						const char *ext = UTIL_GetExtension(file);
    1.40 -#if defined WIN32 || defined _WIN32
    1.41 -						ext = ext ? "" : ".dll";
    1.42 -#else
    1.43 -						ext = ext ? "" : "_i486.so";
    1.44 -#endif
    1.45 -						g_SmmAPI.PathFormat(full_path, sizeof(full_path), "%s/%s%s", g_ModPath.c_str(), file, ext);
    1.46 -					}
    1.47 +					g_SmmAPI.GetFullPluginPath(file, full_path, sizeof(full_path));
    1.48  
    1.49  					SourceHook::List<SourceMM::CPluginManager::CPlugin *>::iterator iter, end;
    1.50  					SourceMM::CPluginManager::CPlugin *pl;