sourcemm/episode2/provider_ep2.cpp
branchsourcemm-1.6.0
changeset 369 2b8c2ea08b6d
parent 368 4a937e6e6f11
     1.1 --- a/sourcemm/episode2/provider_ep2.cpp	Thu Oct 04 19:04:56 2007 +0000
     1.2 +++ b/sourcemm/episode2/provider_ep2.cpp	Thu Oct 04 19:18:19 2007 +0000
     1.3 @@ -58,7 +58,6 @@
     1.4  #undef CommandLine
     1.5  DLL_IMPORT ICommandLine *CommandLine();
     1.6  /* Functions */
     1.7 -CONPRINTF_FUNC ExtractRemotePrinter(void *addr);
     1.8  bool CacheUserMessages();
     1.9  void ClientCommand(edict_t *pEdict, const CCommand &args);
    1.10  void LocalCommand_Meta(const CCommand &args);
    1.11 @@ -66,7 +65,6 @@
    1.12  /* Variables */
    1.13  bool usermsgs_extracted = false;
    1.14  CVector<UsrMsgInfo> usermsgs_list;
    1.15 -CONPRINTF_FUNC echo_msg_func = NULL;
    1.16  ICvar *icvar = NULL;
    1.17  ISmmAPI *metamod_api = NULL;
    1.18  IVEngineServer *engine = NULL;
    1.19 @@ -81,14 +79,7 @@
    1.20  
    1.21  void BaseProvider::ConsolePrint(const char *str)
    1.22  {
    1.23 -	if (echo_msg_func != NULL)
    1.24 -	{
    1.25 -		ConMsg("%s", str);
    1.26 -	}
    1.27 -	else
    1.28 -	{
    1.29 -		Msg("%s", str);
    1.30 -	}
    1.31 +	ConMsg("%s", str);
    1.32  }
    1.33  
    1.34  void BaseProvider::Notify_DLLInit_Pre(void *gamedll,
    1.35 @@ -118,7 +109,6 @@
    1.36  	RegisterConCommandBase(&meta_local_cmd);
    1.37  	conbases_unreg.push_back(&meta_local_cmd);
    1.38  
    1.39 -	echo_msg_func = ExtractRemotePrinter(engineFactory);
    1.40  	usermsgs_extracted = CacheUserMessages();
    1.41  
    1.42  	if (gameclients)
    1.43 @@ -141,7 +131,7 @@
    1.44  
    1.45  bool BaseProvider::IsRemotePrintingAvailable()
    1.46  {
    1.47 -	return (echo_msg_func != NULL);
    1.48 +	return true;
    1.49  }
    1.50  
    1.51  void BaseProvider::ClientConsolePrint(edict_t *client, const char *message)
    1.52 @@ -428,46 +418,6 @@
    1.53  	return true;
    1.54  }
    1.55  
    1.56 -/* :TODO: I hope we can get rid of this in the future */
    1.57 -CONPRINTF_FUNC ExtractRemotePrinter(void *addr)
    1.58 -{
    1.59 -	char path[256+10];
    1.60 -	if (!GetFileOfAddress(addr, path, sizeof(path)))
    1.61 -	{
    1.62 -		return NULL;
    1.63 -	}
    1.64 -
    1.65 -	char *ptr = NULL;
    1.66 -#if defined __linux__
    1.67 -	ptr = strstr(path, "engine_i486.so");
    1.68 -#else
    1.69 -	ptr = strstr(path, "engine.dll");
    1.70 -#endif
    1.71 -
    1.72 -	if (ptr == NULL)
    1.73 -	{
    1.74 -		return NULL;
    1.75 -	}
    1.76 -
    1.77 -#if defined __linux__
    1.78 -	strcpy(ptr, "tier0_i486.so");
    1.79 -#else
    1.80 -	strcpy(ptr, "tier0.dll");
    1.81 -#endif
    1.82 -
    1.83 -	HINSTANCE handle = dlmount(path);
    1.84 -	if (handle == NULL)
    1.85 -	{
    1.86 -		return NULL;
    1.87 -	}
    1.88 -
    1.89 -	void *func = dlsym(handle, "ConMsg");
    1.90 -	
    1.91 -	dlclose(handle);
    1.92 -
    1.93 -	return (CONPRINTF_FUNC)func;
    1.94 -}
    1.95 -
    1.96  //////////////////////////////////////////////////////////////////////
    1.97  // EVEN MORE HACKS HERE! YOU HAVE BEEN WARNED!                      //
    1.98  // Signatures necessary in finding the pointer to the CUtlDict that //