void mog::network::ServerNetworkManager::processInstanceReplications()
{
	for (auto clientRep : clientReplicationInfos)
	{
		while (!clientRep->isToBeReplicatedEmpty())
		{
			auto instanceId = clientRep->getToBeReplicatedInstance();
			auto obj = findNetworkGameObject(instanceId);
			Role role = Role_None;
			if (*clientRep->getClient() == *obj->getClient())
				role = Role_Proxy;
			else
				role = Role_Simulated;

			sendMessage(ReplicateInstanceMessage(obj, role), *(clientRep->getAddress()));
			sendMessage(ReplicateStateMessage(obj), *(clientRep->getAddress()));
			clientRep->eraseToBeReplicatedInstance(instanceId);
		}
	}
}
bool mog::network::NetworkManager::hasNetworkGameObject(unsigned instanceId) const
{
	return findNetworkGameObject(instanceId) != nullptr;
}