1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-26 19:54:14 +01:00
--HG--
branch : sourcemm-1.4.3
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/branches/sourcemm-1.4.3%40619
This commit is contained in:
Pavol Marko 2008-01-17 19:46:12 +00:00
parent 379cd45ac3
commit 06e52049fd
2 changed files with 7 additions and 3 deletions

View File

@ -782,7 +782,7 @@ namespace SourceHook
// But: we have to return false in the post phase of pre recalls (ie. a pre hook made a recall).
if (m_HLIStack.front().recall == HookLoopInfo::Recall_Pre &&
static_cast<CIface*>(m_HLIStack.front().pCurIface)->m_PostHooks.RQFlagGet())
static_cast<CIface*>(m_HLIStack.front().pCurIface)->m_PreHooks.RelFlagGet())
{
return false;
}
@ -1020,6 +1020,8 @@ namespace SourceHook
}
void CSourceHookImpl::CHookList::ReleaseIter(IIter *pIter)
{
m_RelFlag = true;
CIter *pIter2 = static_cast<CIter*>(pIter);
// Unlink from m_UsedIters
@ -1029,7 +1031,7 @@ namespace SourceHook
if (pIter2->m_pPrev)
pIter2->m_pPrev->m_pNext = pIter2->m_pNext;
if (pIter2 == m_UsedIters)
m_UsedIters = NULL;
m_UsedIters = m_UsedIters->m_pNext;
// Link to m_FreeIters

View File

@ -277,6 +277,7 @@ namespace SourceHook
// For recalls
bool m_Recall;
bool m_RQFlag;
bool m_RelFlag;
void SetRecallState(); // Sets the list into a state where the next returned
// iterator (from GetIter) will be a copy of the last
@ -284,8 +285,9 @@ namespace SourceHook
// The hook resets this state automatically on:
// GetIter, ReleaseIter
void RQFlagReset() { m_RQFlag = false; }
void RQFlagReset() { m_RQFlag = false; m_RelFlag = false; }
bool RQFlagGet() { return m_RQFlag; }
bool RelFlagGet() { return m_RelFlag; }
CHookList();
CHookList(const CHookList &other);
virtual ~CHookList();