예제 #1
0
//-----------------------------------------------------------------------------
// Purpose: Called to Shutdown the game UI system
//-----------------------------------------------------------------------------
void CGameUI::Shutdown()
{
	// notify all the modules of Shutdown
	g_VModuleLoader.ShutdownPlatformModules();

	// unload the modules them from memory
	g_VModuleLoader.UnloadPlatformModules();

	ModInfo().FreeModInfo();
	
	// release platform mutex
	// close the mutex
	if (g_hMutex)
	{
		Sys_ReleaseMutex(g_hMutex);
	}
	if (g_hWaitMutex)
	{
		Sys_ReleaseMutex(g_hWaitMutex);
	}

	steamapicontext->Clear();
#ifndef _X360
	// SteamAPI_Shutdown(); << Steam shutdown is controlled by engine
#endif
	
	ConVar_Unregister();
	DisconnectTier3Libraries();
	DisconnectTier2Libraries();
	DisconnectTier1Libraries();
}
예제 #2
0
//-----------------------------------------------------------------------------
// Purpose: called when the plugin is unloaded (turned off)
//-----------------------------------------------------------------------------
void CSourcePython::Unload( void )
{
	Msg(MSG_PREFIX "Unloading...\n");
	
	DevMsg(1, MSG_PREFIX "Unhooking all functions...\n");
	GetHookManager()->UnhookAllFunctions();
	
	DevMsg(1, MSG_PREFIX "Shutting down python...\n");
	g_PythonManager.Shutdown();

	DevMsg(1, MSG_PREFIX "Clearing all commands...\n");
	ClearAllCommands();

	DevMsg(1, MSG_PREFIX "Unregistering ConVar...\n");
	ConVar_Unregister( );

	// New in CSGO...
#ifdef ENGINE_CSGO
	DevMsg(1, MSG_PREFIX "Disconnecting interfaces...\n");
	DisconnectInterfaces();
#else
	DevMsg(1, MSG_PREFIX "Disconnecting tier2 libraries...\n");
	DisconnectTier2Libraries( );

	DevMsg(1, MSG_PREFIX "Disconnecting tier1 libraries...\n");
	DisconnectTier1Libraries( );
#endif

	DevMsg(1, MSG_PREFIX "Resetting cache notifier...\n");
	modelcache->SetCacheNotify(m_pOldMDLCacheNotifier);

	Msg(MSG_PREFIX "Unloaded successfully.\n");
}
예제 #3
0
//---------------------------------------------------------------------------------
// Purpose: called when the plugin is unloaded (turned off)
//---------------------------------------------------------------------------------
void CEmptyServerPlugin::Unload( void )
{
	gameeventmanager->RemoveListener( this ); // make sure we are unloaded from the event system

	ConVar_Unregister( );
	DisconnectTier2Libraries( );
	DisconnectTier1Libraries( );
}
void CSSServerPlugin::Unload( void )
{
	Msg("Unloading.\n");
	
	NetFilter_Unload();
	FileFilter_Unload();

	ConVar_Unregister( );
	DisconnectTier1Libraries( );
}
예제 #5
0
void CGameUI2::Shutdown()
{
    if (GetBasePanel())
        GetBasePanel()->DeletePanel();

	ConVar_Unregister();
	DisconnectTier3Libraries();
	DisconnectTier2Libraries();
	DisconnectTier1Libraries();
}
//---------------------------------------------------------------------------------
// Purpose: called when the plugin is unloaded (turned off)
//---------------------------------------------------------------------------------
void CEmptyServerPlugin::Unload( void )
{
	m_SizzlingMatches.SM_Msg( "plugin unloading\n" );
	gameeventmanager->RemoveListener( this ); // make sure we are unloaded from the event system

	m_SizzlingMatches.SM_DeleteAllPlayerData();

	ConVar_Unregister( );
	DisconnectTier2Libraries( );
	DisconnectTier1Libraries( );
}
void ExternalExtensionsPlugin::Unload(void) {
	PRINT_TAG();
	ConColorMsg(Color(255, 255, 0, 255), "Unloading plugin...\n");

	g_ModuleManager->UnloadAllModules();

	ConVar_Unregister();
	Interfaces::Unload();

	PRINT_TAG();
	ConColorMsg(Color(0, 255, 0, 255), "Finished unloading!\n");
}
예제 #8
0
//---------------------------------------------------------------------------------
// Purpose: called when the plugin is unloaded (turned off)
//---------------------------------------------------------------------------------
void WebSpecPlugin::Unload( void )
{
	gameEventManager->RemoveListener( this ); // make sure we are unloaded from the event system

	ws_shouldListen = false;
#if defined(_LINUX) || defined(_OSX)
	usleep(60*1000);
#else
	Sleep(60);
#endif
	libwebsocket_context_destroy(wsContext);

	ConVar_Unregister( );
	DisconnectTier1Libraries( );
}
예제 #9
0
//---------------------------------------------------------------------------------
// Purpose: called when the plugin is unloaded (turned off)
//---------------------------------------------------------------------------------
void CSourcePython::Unload( void )
{
	gameeventmanager->RemoveListener( this ); // make sure we are unloaded from the event system
	ClearAllCommands();
	ConVar_Unregister( );

	g_PythonManager.Shutdown();

	// New in CSGO...
#if( SOURCE_ENGINE >= 3 )
	DisconnectInterfaces();
#else
	DisconnectTier2Libraries( );
	DisconnectTier1Libraries( );
#endif
}
예제 #10
0
//-----------------------------------------------------------------------------
// Purpose: called when the plugin is unloaded (turned off)
//-----------------------------------------------------------------------------
void CSourcePython::Unload( void )
{
	gameeventmanager->RemoveListener( this ); // make sure we are unloaded from the event system
	ClearAllCommands();
	ConVar_Unregister( );

	g_PythonManager.Shutdown();

	// New in CSGO...
#ifdef ENGINE_CSGO
	DisconnectInterfaces();
#else
	DisconnectTier2Libraries( );
	DisconnectTier1Libraries( );
#endif

	g_pHookMngr->UnhookAllFunctions();
}
예제 #11
0
//---------------------------------------------------------------------------------
// Purpose: called when the plugin is unloaded (turned off)
//---------------------------------------------------------------------------------
void CNoCheatZPlugin::Unload( void )
{
	if(BanRequest::GetInstance()->NeedWriteID())
	{
		CIFaceManager::GetInstance()->GetIengine()->ServerCommand("writeid\n");
		CIFaceManager::GetInstance()->GetIengine()->ServerCommand("writeip\n");
		CIFaceManager::GetInstance()->GetIengine()->ServerExecute();
	}

	if(!m_bAlreadyLoaded && g_pCVar)
	{
		ConVar* inst = nullptr;
		inst = g_pCVar->FindVar("nocheatz_instance");
		if(inst) inst->SetValue("0");
	}

	ValidationTester::Delete();
#ifndef NCZ_CSGO
	JumpTester::Delete();
#endif
	EyeAnglesTester::Delete();
	ConVarTester::Delete();
	ShotTester::Delete();
	SpeedTester::Delete();
	NczPlayerManager::Delete();

	CIFaceManager::Delete();
	BanRequest::Delete();

	PlayerRunCommandHookListener::UnhookPlayerRunCommand();
	OnGroundHookListener::UnhookOnGround();
	TeleportHookListener::UnhookTeleport();

	ILogger.Flush();

	ConVar_Unregister( );
	//DisconnectTier2Libraries( );
	DisconnectTier1Libraries( );
}
예제 #12
0
파일: hack.cpp 프로젝트: UNKN-0WN/cathook
void hack::Shutdown()
{
    if (hack::shutdown)
        return;
    hack::shutdown = true;
    // Stop cathook stuff
    settings::RVarLock.store(true);
    playerlist::Save();
#if ENABLE_VISUALS
    sdl_hooks::cleanSdlHooks();
#endif
    logging::Info("Unregistering convars..");
    ConVar_Unregister();
    logging::Info("Shutting down killsay...");
    if (!hack::game_shutdown)
    {
        EC::run(EC::Shutdown);
#if ENABLE_VISUALS
        g_pScreenSpaceEffects->DisableScreenSpaceEffect("_cathook_glow");
        g_pScreenSpaceEffects->DisableScreenSpaceEffect("_cathook_chams");
#endif
    }
    logging::Info("Success..");
}
bool CSourceMMMAP::Unload(char *error, size_t maxlen)
{
#if defined ( GAME_CSGO )
	ConCommand *remove_cheat_on_bot_kill = static_cast<ConCommand *>(g_pCVar->FindCommand("bot_kill"));

	if (remove_cheat_on_bot_kill)
	{
		if (!(remove_cheat_on_bot_kill->GetFlags() & FCVAR_CHEAT))
			remove_cheat_on_bot_kill->AddFlags(FCVAR_CHEAT);
	}
#endif

	if(g_CallBackCount > 0)
	{
		for(unsigned int i=0;i<g_CallBackCount;i++)
		{
			AdminInterfaceListner *ptr = (AdminInterfaceListner *)g_CallBackList[i]->ptr;
			if(!ptr)
				continue;

			ptr->OnAdminInterfaceUnload();
		}
	}

	gpManiAdminPlugin->Unload();
	//IT IS CRUCIAL THAT YOU REMOVE CVARS.
	//As of Metamod:Source 1.00-RC2, it will automatically remove them for you.
	//But this is only if you've registered them correctly!
    
	//Make sure we remove any hooks we did... this may not be necessary since
	//SourceHook is capable of unloading plugins' hooks itself, but just to be safe.

//	SH_REMOVE_HOOK_STATICFUNC(IGameEventManager2, FireEvent, gameeventmanager, FireEvent_Handler, false); 
	SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelInit, serverdll, &g_ManiCallback, &CSourceMMMAP::LevelInit, true);
	SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, serverdll, &g_ManiCallback, &CSourceMMMAP::ServerActivate, true);
	SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameFrame, serverdll, &g_ManiCallback, &CSourceMMMAP::GameFrame, true);
	SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, serverdll, &g_ManiCallback, &CSourceMMMAP::LevelShutdown, false);
	SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientActive, serverclients, &g_ManiCallback, &CSourceMMMAP::ClientActive, true);
	SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, serverclients, &g_ManiCallback, &CSourceMMMAP::ClientDisconnect, true);
	SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, serverclients, &g_ManiCallback, &CSourceMMMAP::ClientPutInServer, true);
	SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, SetCommandClient, serverclients, &g_ManiCallback, &CSourceMMMAP::SetCommandClient, true);
	SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, serverclients, &g_ManiCallback, &CSourceMMMAP::ClientSettingsChanged, true);
	SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientConnect, serverclients, &g_ManiCallback, &CSourceMMMAP::ClientConnect, false);
	SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientCommand, serverclients, &g_ManiCallback, &CSourceMMMAP::ClientCommand, false);

	if (voiceserver && gpManiGameType->IsVoiceAllowed())
	{
		SH_REMOVE_HOOK_MEMFUNC(IVoiceServer, SetClientListening, voiceserver, &g_ManiSMMHooks, &ManiSMMHooks::SetClientListening, false);
	}

	if (effects && gpManiGameType->GetAdvancedEffectsAllowed())
	{
		SH_REMOVE_HOOK_MEMFUNC(ITempEntsSystem, PlayerDecal, temp_ents, &g_ManiSMMHooks, &ManiSMMHooks::PlayerDecal, false);
	}

	if (pSayCmd) SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, pSayCmd, Say_handler, false);
	if (pRespawnEntities) SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, pRespawnEntities, RespawnEntities_handler, false);
	if (pTeamSayCmd) SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, pTeamSayCmd, TeamSay_handler, false);
	if (pChangeLevelCmd) SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, pChangeLevelCmd, ChangeLevel_handler, false);
	if (pAutoBuyCmd) 
	{
		SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, pAutoBuyCmd, AutoBuy_handler, false);
#if !defined GAME_ORANGE && defined SOURCEMM
		SH_RELEASE_CALLCLASS(autobuy_cc);
#endif
	}

	if (pReBuyCmd) 
	{
		SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, pReBuyCmd, ReBuy_handler, false);
#if !defined GAME_ORANGE && defined SOURCEMM
		SH_RELEASE_CALLCLASS(rebuy_cc);
#endif
	}

#if !defined GAME_ORANGE && defined SOURCEMM
	if (gpManiGameType->GetAdvancedEffectsAllowed())
	{
		SH_RELEASE_CALLCLASS(temp_ents_cc);
	}
	//this, sourcehook does not keep track of.  we must do this.
	SH_RELEASE_CALLCLASS(engine_cc);
	SH_RELEASE_CALLCLASS(voiceserver_cc);
	SH_RELEASE_CALLCLASS(serverdll_cc);
#endif
	//this, sourcehook does not keep track of.  we must do this.
#if defined ( GAME_ORANGE )
	ConVar_Unregister(); // probably not needed, but do it just in case.
#endif
	return true; 
}