Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CFrameActionMngr (RequestFrame) not being cleared #1076

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions amxmodx/CFrameAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ class CFrameActionMngr
}
}

void clear()
{
int count = m_requestedFrames.length();
while (count--)
{
m_requestedFrames.popFront();
}
}

private:
ke::Deque<ke::AutoPtr<CFrameAction>> m_requestedFrames;

Expand Down
3 changes: 3 additions & 0 deletions amxmodx/meta_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ int C_Spawn(edict_t *pent)

}

g_frameActionMngr.clear();
g_forwards.clear();

g_log.MapChange();
Expand Down Expand Up @@ -771,6 +772,7 @@ void C_ServerDeactivate_Post()
g_forcegeneric.clear();
g_grenades.clear();
g_tasksMngr.clear();
g_frameActionMngr.clear();
g_forwards.clear();
g_logevents.clearLogEvents();
g_events.clearEvents();
Expand Down Expand Up @@ -1731,6 +1733,7 @@ C_DLLEXPORT int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason)
modules_callPluginsUnloading();

g_auth.clear();
g_frameActionMngr.clear();
g_forwards.clear();
g_commands.clear();
g_forcemodels.clear();
Expand Down