Ejemplo n.º 1
0
void TF2Tools::OnPluginUnloaded(IPlugin *plugin)
{
	if (m_CritDetoursEnabled && !g_critForward->GetFunctionCount())
	{
		g_CritManager.Disable();
		m_CritDetoursEnabled = false;
	}
	if (m_CondChecksEnabled)
	{
		if (!g_addCondForward->GetFunctionCount() && !g_removeCondForward->GetFunctionCount())
		{
			g_CondMgr.Shutdown();
			m_CondChecksEnabled = false;
		}
	}
	if (m_RulesDetoursEnabled)
	{
		if (!g_waitingPlayersStartForward->GetFunctionCount() && !g_waitingPlayersEndForward->GetFunctionCount())
		{
			RemoveRulesDetours();
			m_RulesDetoursEnabled = false;
		}
	}
	if (m_TeleportDetourEnabled && !g_teleportForward->GetFunctionCount())
	{
		RemoveTeleporterDetour();
		m_TeleportDetourEnabled = false;
	}
}
Ejemplo n.º 2
0
void TF2Tools::OnPluginUnloaded(IPlugin *plugin)
{
	if (m_CritDetoursEnabled && !g_critForward->GetFunctionCount())
	{
		RemoveCritDetours();
		m_CritDetoursEnabled = false;
	}
	if (m_IsHolidayDetourEnabled && !g_isHolidayForward->GetFunctionCount())
	{
		RemoveIsHolidayDetour();
		m_IsHolidayDetourEnabled = false;
	}
	if (m_CondChecksEnabled)
	{
		if (!g_addCondForward->GetFunctionCount() && !g_removeCondForward->GetFunctionCount())
		{
			RemoveConditionChecks();
			m_CondChecksEnabled = false;
		}
	}
	if (m_RulesDetoursEnabled)
	{
		if (!g_waitingPlayersStartForward->GetFunctionCount() && !g_waitingPlayersEndForward->GetFunctionCount())
		{
			RemoveRulesDetours();
			m_RulesDetoursEnabled = false;
		}
	}
	if (m_TeleportDetourEnabled && !g_teleportForward->GetFunctionCount())
	{
		RemoveTeleporterDetour();
		m_TeleportDetourEnabled = false;
	}
}