Пример #1
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");
}
Пример #2
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
}
Пример #3
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();
}
Пример #4
0
void DisconnectTier1Libraries()
{
	DisconnectInterfaces();
}