Added ReadyForEntityUpdates message allowing the server to send entity updates
This commit is contained in:
@@ -36,7 +36,8 @@ namespace Multiplayer
|
||||
void Update(AZ::TimeMs serverGameTimeMs) override;
|
||||
//! @}
|
||||
|
||||
bool CanSendUpdates();
|
||||
bool CanSendUpdates() const;
|
||||
void SetCanSendUpdates(bool canSendUpdates);
|
||||
|
||||
NetworkEntityHandle GetPrimaryPlayerEntity();
|
||||
const NetworkEntityHandle& GetPrimaryPlayerEntity() const;
|
||||
@@ -51,7 +52,7 @@ namespace Multiplayer
|
||||
EntityStopEvent::Handler m_controlledEntityRemovedHandler;
|
||||
EntityMigrationEvent::Handler m_controlledEntityMigrationHandler;
|
||||
AzNetworking::IConnection* m_connection = nullptr;
|
||||
bool m_canSendUpdates = true;
|
||||
bool m_canSendUpdates = false;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -12,11 +12,17 @@
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
inline bool ServerToClientConnectionData::CanSendUpdates()
|
||||
inline bool ServerToClientConnectionData::CanSendUpdates() const
|
||||
{
|
||||
return m_canSendUpdates;
|
||||
}
|
||||
|
||||
inline void ServerToClientConnectionData::SetCanSendUpdates(bool canSendUpdates)
|
||||
{
|
||||
m_canSendUpdates = canSendUpdates;
|
||||
}
|
||||
|
||||
|
||||
inline NetworkEntityHandle ServerToClientConnectionData::GetPrimaryPlayerEntity()
|
||||
{
|
||||
return m_controlledEntity;
|
||||
|
||||
Reference in New Issue
Block a user