Skip to content

Commit

Permalink
Fixed CA not receiving owner changing location
Browse files Browse the repository at this point in the history
- The CA now receives changing location messages from the SS for owned objects. Previously would be ignored as sender channels were the same.
  • Loading branch information
ksmit799 committed Apr 8, 2024
1 parent 2347f90 commit e680885
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/clientagent/client_participant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,9 @@ void ClientParticipant::HandleDatagram(const std::shared_ptr<Datagram> &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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/stateserver/distributed_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ void DistributedObject::HandleLocationChange(const uint32_t &newParent,
}

// Send changing location message.
auto dg = std::make_shared<Datagram>(targets, sender,
auto dg = std::make_shared<Datagram>(targets, _doId,
STATESERVER_OBJECT_CHANGING_LOCATION);
dg->AddUint32(_doId);
dg->AddLocation(newParent, newZone);
Expand Down

0 comments on commit e680885

Please sign in to comment.