mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-26 19:54:14 +01:00
Attempt #2
--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:
parent
379cd45ac3
commit
06e52049fd
@ -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).
|
// 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 &&
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1020,6 +1020,8 @@ namespace SourceHook
|
|||||||
}
|
}
|
||||||
void CSourceHookImpl::CHookList::ReleaseIter(IIter *pIter)
|
void CSourceHookImpl::CHookList::ReleaseIter(IIter *pIter)
|
||||||
{
|
{
|
||||||
|
m_RelFlag = true;
|
||||||
|
|
||||||
CIter *pIter2 = static_cast<CIter*>(pIter);
|
CIter *pIter2 = static_cast<CIter*>(pIter);
|
||||||
|
|
||||||
// Unlink from m_UsedIters
|
// Unlink from m_UsedIters
|
||||||
@ -1029,7 +1031,7 @@ namespace SourceHook
|
|||||||
if (pIter2->m_pPrev)
|
if (pIter2->m_pPrev)
|
||||||
pIter2->m_pPrev->m_pNext = pIter2->m_pNext;
|
pIter2->m_pPrev->m_pNext = pIter2->m_pNext;
|
||||||
if (pIter2 == m_UsedIters)
|
if (pIter2 == m_UsedIters)
|
||||||
m_UsedIters = NULL;
|
m_UsedIters = m_UsedIters->m_pNext;
|
||||||
|
|
||||||
// Link to m_FreeIters
|
// Link to m_FreeIters
|
||||||
|
|
||||||
|
@ -277,6 +277,7 @@ namespace SourceHook
|
|||||||
// For recalls
|
// For recalls
|
||||||
bool m_Recall;
|
bool m_Recall;
|
||||||
bool m_RQFlag;
|
bool m_RQFlag;
|
||||||
|
bool m_RelFlag;
|
||||||
|
|
||||||
void SetRecallState(); // Sets the list into a state where the next returned
|
void SetRecallState(); // Sets the list into a state where the next returned
|
||||||
// iterator (from GetIter) will be a copy of the last
|
// iterator (from GetIter) will be a copy of the last
|
||||||
@ -284,8 +285,9 @@ namespace SourceHook
|
|||||||
// The hook resets this state automatically on:
|
// The hook resets this state automatically on:
|
||||||
// GetIter, ReleaseIter
|
// GetIter, ReleaseIter
|
||||||
|
|
||||||
void RQFlagReset() { m_RQFlag = false; }
|
void RQFlagReset() { m_RQFlag = false; m_RelFlag = false; }
|
||||||
bool RQFlagGet() { return m_RQFlag; }
|
bool RQFlagGet() { return m_RQFlag; }
|
||||||
|
bool RelFlagGet() { return m_RelFlag; }
|
||||||
CHookList();
|
CHookList();
|
||||||
CHookList(const CHookList &other);
|
CHookList(const CHookList &other);
|
||||||
virtual ~CHookList();
|
virtual ~CHookList();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user