added amb1341 - OnClientPostAdminFilter

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401837
This commit is contained in:
David Anderson
2008-01-03 19:40:55 +00:00
parent 9b6c6c1fcd
commit 89ac3a14ba
2 changed files with 23 additions and 0 deletions
+6
View File
@@ -51,6 +51,7 @@ PlayerManager g_Players;
bool g_OnMapStarted = false;
IForward *PreAdminCheck = NULL;
IForward *PostAdminCheck = NULL;
IForward *PostAdminFilter = NULL;
const unsigned int *g_NumPlayersToAuth = NULL;
int lifestate_offset = -1;
List<ICommandTargetProcessor *> target_processors;
@@ -130,6 +131,7 @@ void PlayerManager::OnSourceModAllInitialized()
PreAdminCheck = g_Forwards.CreateForward("OnClientPreAdminCheck", ET_Event, 1, p1);
PostAdminCheck = g_Forwards.CreateForward("OnClientPostAdminCheck", ET_Ignore, 1, p1);
PostAdminFilter = g_Forwards.CreateForward("OnClientPostAdminFilter", ET_Ignore, 1, p1);
}
void PlayerManager::OnSourceModShutdown()
@@ -155,6 +157,7 @@ void PlayerManager::OnSourceModShutdown()
g_Forwards.ReleaseForward(PreAdminCheck);
g_Forwards.ReleaseForward(PostAdminCheck);
g_Forwards.ReleaseForward(PostAdminFilter);
delete [] m_Players;
}
@@ -1374,6 +1377,9 @@ void CPlayer::NotifyPostAdminChecks()
pListener->OnClientPostAdminCheck(m_iIndex);
}
PostAdminFilter->PushCell(m_iIndex);
PostAdminFilter->Execute(NULL);
PostAdminCheck->PushCell(m_iIndex);
PostAdminCheck->Execute(NULL);
}