Add new name of OnValidateClient, preserve compat.

This commit is contained in:
KyleSanderson
2014-01-11 12:45:00 -07:00
parent e619c83446
commit 36607e7dda
2 changed files with 14 additions and 6 deletions
+10 -3
View File
@@ -26,7 +26,8 @@ SteamWorksForwards::SteamWorksForwards() :
m_CallbackSteamConnectFailure(this, &SteamWorksForwards::OnSteamServersConnectFailure),
m_CallbackSteamDisconnected(this, &SteamWorksForwards::OnSteamServersDisconnected)
{
this->pFOVC = forwards->CreateForward("SW_OnValidateClient", ET_Ignore, 2, NULL, Param_Cell, Param_Cell);
this->pFOVC_Old = forwards->CreateForward("SW_OnValidateClient", ET_Ignore, 2, NULL, Param_Cell, Param_Cell);
this->pFOVC = forwards->CreateForward("SteamWorks_OnValidateClient", ET_Ignore, 2, NULL, Param_Cell, Param_Cell);
this->pFOSSC = forwards->CreateForward("SteamWorks_SteamServersConnected", ET_Ignore, 0, NULL);
this->pFOSSCF = forwards->CreateForward("SteamWorks_SteamServersConnectFailure", ET_Ignore, 1, NULL, Param_Cell);
this->pFOSSD = forwards->CreateForward("SteamWorks_SteamServersDisconnected", ET_Ignore, 1, NULL, Param_Cell);
@@ -34,6 +35,7 @@ SteamWorksForwards::SteamWorksForwards() :
SteamWorksForwards::~SteamWorksForwards()
{
forwards->ReleaseForward(this->pFOVC_Old);
forwards->ReleaseForward(this->pFOVC);
forwards->ReleaseForward(this->pFOSSC);
forwards->ReleaseForward(this->pFOSSCF);
@@ -42,15 +44,20 @@ SteamWorksForwards::~SteamWorksForwards()
void SteamWorksForwards::NotifyPawnValidateClient(Account_t parent, Account_t child)
{
if (this->pFOVC->GetFunctionCount() == 0)
if (this->pFOVC_Old->GetFunctionCount() != 0)
{
return;
this->pFOVC_Old->PushCell(parent);
this->pFOVC_Old->PushCell(child);
this->pFOVC_Old->Execute(NULL);
}
if (this->pFOVC->GetFunctionCount() != 0)
{
this->pFOVC->PushCell(parent);
this->pFOVC->PushCell(child);
this->pFOVC->Execute(NULL);
}
}
void SteamWorksForwards::OnGSClientApprove(GSClientApprove_t *pApprove)
{
+1
View File
@@ -42,6 +42,7 @@ class SteamWorksForwards
private:
IForward *pFOVC; /* Forward On Validate Client */
IForward *pFOVC_Old; /* OLD Forward On Validate Client */
IForward *pFOSSC; /* Forward On Steam Servers Connected */
IForward *pFOSSCF; /* Forward On Steam Servers Connect Failure */
IForward *pFOSSD; /* Forward On Steam Servers Disconnected */