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
+13 -6
View File
@@ -26,7 +26,8 @@ SteamWorksForwards::SteamWorksForwards() :
m_CallbackSteamConnectFailure(this, &SteamWorksForwards::OnSteamServersConnectFailure), m_CallbackSteamConnectFailure(this, &SteamWorksForwards::OnSteamServersConnectFailure),
m_CallbackSteamDisconnected(this, &SteamWorksForwards::OnSteamServersDisconnected) 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->pFOSSC = forwards->CreateForward("SteamWorks_SteamServersConnected", ET_Ignore, 0, NULL);
this->pFOSSCF = forwards->CreateForward("SteamWorks_SteamServersConnectFailure", ET_Ignore, 1, NULL, Param_Cell); this->pFOSSCF = forwards->CreateForward("SteamWorks_SteamServersConnectFailure", ET_Ignore, 1, NULL, Param_Cell);
this->pFOSSD = forwards->CreateForward("SteamWorks_SteamServersDisconnected", 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() SteamWorksForwards::~SteamWorksForwards()
{ {
forwards->ReleaseForward(this->pFOVC_Old);
forwards->ReleaseForward(this->pFOVC); forwards->ReleaseForward(this->pFOVC);
forwards->ReleaseForward(this->pFOSSC); forwards->ReleaseForward(this->pFOSSC);
forwards->ReleaseForward(this->pFOSSCF); forwards->ReleaseForward(this->pFOSSCF);
@@ -42,14 +44,19 @@ SteamWorksForwards::~SteamWorksForwards()
void SteamWorksForwards::NotifyPawnValidateClient(Account_t parent, Account_t child) 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);
} }
this->pFOVC->PushCell(parent); if (this->pFOVC->GetFunctionCount() != 0)
this->pFOVC->PushCell(child); {
this->pFOVC->Execute(NULL); this->pFOVC->PushCell(parent);
this->pFOVC->PushCell(child);
this->pFOVC->Execute(NULL);
}
} }
void SteamWorksForwards::OnGSClientApprove(GSClientApprove_t *pApprove) void SteamWorksForwards::OnGSClientApprove(GSClientApprove_t *pApprove)
+1
View File
@@ -42,6 +42,7 @@ class SteamWorksForwards
private: private:
IForward *pFOVC; /* Forward On Validate Client */ IForward *pFOVC; /* Forward On Validate Client */
IForward *pFOVC_Old; /* OLD Forward On Validate Client */
IForward *pFOSSC; /* Forward On Steam Servers Connected */ IForward *pFOSSC; /* Forward On Steam Servers Connected */
IForward *pFOSSCF; /* Forward On Steam Servers Connect Failure */ IForward *pFOSSCF; /* Forward On Steam Servers Connect Failure */
IForward *pFOSSD; /* Forward On Steam Servers Disconnected */ IForward *pFOSSD; /* Forward On Steam Servers Disconnected */