sourcehook/sourcehook.cpp
changeset 123 53e819ac032a
parent 121 158b860440c0
child 128 63f95eed16b6
     1.1 --- a/sourcehook/sourcehook.cpp	Thu Oct 06 00:59:01 2005 +0000
     1.2 +++ b/sourcehook/sourcehook.cpp	Thu Oct 06 20:46:49 2005 +0000
     1.3 @@ -365,6 +365,8 @@
     1.4  			if (iface_iter->m_PostHooks.m_List.empty() && iface_iter->m_PreHooks.m_List.empty())
     1.5  			{
     1.6  				// There are no hooks on this iface anymore...
     1.7 +				if (m_CurIface == static_cast<IIface*>(&(*iface_iter)))
     1.8 +					m_HLS = HLS_Stop;
     1.9  
    1.10  				iface_iter = vfnptr_iter->m_Ifaces.erase(iface_iter);
    1.11  				if (vfnptr_iter->m_Ifaces.empty())
    1.12 @@ -577,6 +579,16 @@
    1.13  		return m_IfacePtr;
    1.14  	}
    1.15  
    1.16 +	HookLoopStatus &CSourceHookImpl::GetStatusVarRef(IIface *pIface)
    1.17 +	{
    1.18 +		m_CurIface = pIface;
    1.19 +		return m_HLS;
    1.20 +	}
    1.21 +	void CSourceHookImpl::HookLoopDone()
    1.22 +	{
    1.23 +		m_CurIface = NULL;
    1.24 +	}
    1.25 +
    1.26  	////////////////////////////
    1.27  	// CCallClassImpl
    1.28  	////////////////////////////
    1.29 @@ -762,6 +774,8 @@
    1.30  			pIter2->m_pNext->m_pPrev = pIter2->m_pPrev;
    1.31  		if (pIter2->m_pPrev)
    1.32  			pIter2->m_pPrev->m_pNext = pIter2->m_pNext;
    1.33 +		if (pIter2 == m_UsedIters)
    1.34 +			m_UsedIters = NULL;
    1.35  
    1.36  		// Link to m_FreeIters
    1.37