core-legacy/CSmmAPI.cpp
changeset 683 b507295429f9
parent 667 938f7325d919
child 689 4065ba5e9155
     1.1 --- a/core-legacy/CSmmAPI.cpp	Tue Nov 17 04:49:17 2009 -0500
     1.2 +++ b/core-legacy/CSmmAPI.cpp	Sun Nov 22 23:54:55 2009 -0600
     1.3 @@ -1,5 +1,5 @@
     1.4  /* ======== SourceMM ========
     1.5 - * Copyright (C) 2004-2008 Metamod:Source Development Team
     1.6 + * Copyright (C) 2004-2009 Metamod:Source Development Team
     1.7   * No warranties of any kind
     1.8   *
     1.9   * License: zlib/libpng
    1.10 @@ -13,7 +13,6 @@
    1.11  #include "sourcemm.h"
    1.12  #include "concommands.h"
    1.13  #include "CPlugin.h"
    1.14 -#include "vsp_listener.h"
    1.15  #include "util.h"
    1.16  
    1.17  /**
    1.18 @@ -466,15 +465,13 @@
    1.19  		}
    1.20  	}
    1.21  
    1.22 -	char our_path[PATH_SIZE];
    1.23 -	GetFileOfAddress((void*)LoadAsGameDLL, our_path, sizeof(our_path));
    1.24 -
    1.25 -	const char *usepath = our_path;
    1.26 -	if (UTIL_Relatize(rel_path, sizeof(rel_path), engine_file, our_path))
    1.27 +	const char *usepath = g_MetamodPath.c_str();
    1.28 +	if (UTIL_Relatize(rel_path, sizeof(rel_path), engine_file, g_MetamodPath.c_str()))
    1.29 +	{
    1.30  		usepath = rel_path;
    1.31 +	}
    1.32  	
    1.33  	char command[PATH_SIZE * 2];
    1.34 -	g_VspListener.SetLoadable(true);
    1.35  	UTIL_Format(command, sizeof(command), "plugin_load \"%s\"\n", usepath);
    1.36  	g_Engine.engine->ServerCommand(command);
    1.37  }
    1.38 @@ -482,7 +479,7 @@
    1.39  void CSmmAPI::EnableVSPListener()
    1.40  {
    1.41  	/* If GameInit already passed and we're not already enabled or loaded, go ahead and LoadAsVSP load */
    1.42 -	if (g_bGameInit && !m_VSP && !g_VspListener.IsLoaded() && !g_bIsBridgedAsVsp)
    1.43 +	if (g_bGameInit && !m_VSP && !g_bIsBridgedAsVsp)
    1.44  	{
    1.45  		LoadAsVSP();
    1.46  	}