Fix inconsistent naming and cover edge case
This commit is contained in:
@@ -40,6 +40,7 @@ namespace Multiplayer
|
||||
//! @}
|
||||
|
||||
const AZStd::string& GetProviderTicket() const;
|
||||
void SetProviderTicket(const AZStd::string&);
|
||||
|
||||
private:
|
||||
EntityReplicationManager m_entityReplicationManager;
|
||||
|
||||
@@ -26,4 +26,9 @@ namespace Multiplayer
|
||||
{
|
||||
return m_providerTicket;
|
||||
}
|
||||
|
||||
inline void ClientToServerConnectionData::SetProviderTicket(const AZStd::string& ticket)
|
||||
{
|
||||
m_providerTicket = ticket;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Multiplayer
|
||||
NetworkEntityHandle GetPrimaryPlayerEntity();
|
||||
const NetworkEntityHandle& GetPrimaryPlayerEntity() const;
|
||||
const AZStd::string& GetProviderTicket() const;
|
||||
void SetProviderTicket(AZStd::string);
|
||||
void SetProviderTicket(const AZStd::string&);
|
||||
|
||||
private:
|
||||
void OnControlledEntityRemove();
|
||||
@@ -53,7 +53,7 @@ namespace Multiplayer
|
||||
NetworkEntityHandle m_controlledEntity;
|
||||
EntityStopEvent::Handler m_controlledEntityRemovedHandler;
|
||||
EntityServerMigrationEvent::Handler m_controlledEntityMigrationHandler;
|
||||
AZStd::string m_ticket;
|
||||
AZStd::string m_providerTicket;
|
||||
AzNetworking::IConnection* m_connection = nullptr;
|
||||
bool m_canSendUpdates = false;
|
||||
};
|
||||
|
||||
@@ -35,11 +35,11 @@ namespace Multiplayer
|
||||
|
||||
inline const AZStd::string& ServerToClientConnectionData::GetProviderTicket() const
|
||||
{
|
||||
return m_ticket;
|
||||
return m_providerTicket;
|
||||
}
|
||||
|
||||
inline void ServerToClientConnectionData::SetProviderTicket(AZStd::string ticket)
|
||||
inline void ServerToClientConnectionData::SetProviderTicket(const AZStd::string& ticket)
|
||||
{
|
||||
m_ticket = ticket;
|
||||
m_providerTicket = ticket;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,6 +208,11 @@ namespace Multiplayer
|
||||
{
|
||||
connection->SetUserData(new ClientToServerConnectionData(connection, *this, config.m_playerSessionId));
|
||||
}
|
||||
else
|
||||
{
|
||||
reinterpret_cast<ClientToServerConnectionData*>(connection->GetUserData())->SetProviderTicket(config.m_playerSessionId);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user