From e6808859894e75742ea352122732e4bb8de8e024 Mon Sep 17 00:00:00 2001 From: Kylie Smith Date: Mon, 8 Apr 2024 13:38:44 +1000 Subject: [PATCH] Fixed CA not receiving owner changing location - The CA now receives changing location messages from the SS for owned objects. Previously would be ignored as sender channels were the same. --- src/clientagent/client_participant.cpp | 3 +++ src/stateserver/distributed_object.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/clientagent/client_participant.cpp b/src/clientagent/client_participant.cpp index 7d45f7c..f4fcd5e 100644 --- a/src/clientagent/client_participant.cpp +++ b/src/clientagent/client_participant.cpp @@ -518,6 +518,9 @@ void ClientParticipant::HandleDatagram(const std::shared_ptr &dg) { case STATESERVER_OBJECT_CHANGING_LOCATION: { uint32_t doId = dgi.GetUint32(); if (TryQueuePending(doId, dgi.GetUnderlyingDatagram())) { + // The object that's changing location is currently generating inside an + // active InterestOperation. Queue this message to be handled after it + // generates. return; } diff --git a/src/stateserver/distributed_object.cpp b/src/stateserver/distributed_object.cpp index ccb074d..ccea20e 100644 --- a/src/stateserver/distributed_object.cpp +++ b/src/stateserver/distributed_object.cpp @@ -651,7 +651,7 @@ void DistributedObject::HandleLocationChange(const uint32_t &newParent, } // Send changing location message. - auto dg = std::make_shared(targets, sender, + auto dg = std::make_shared(targets, _doId, STATESERVER_OBJECT_CHANGING_LOCATION); dg->AddUint32(_doId); dg->AddLocation(newParent, newZone);