Fix "orbit" semantics. Federation works.
This commit is contained in:
parent
969e09210d
commit
af4e79735c
3 changed files with 24 additions and 5 deletions
|
@ -455,16 +455,16 @@ bool IncomingPacket::_doOK(const RuntimeEnvironment *RR,const SharedPtr<Peer> &p
|
|||
|
||||
// Handle planet or moon updates if present
|
||||
if ((ptr + 2) <= size()) {
|
||||
const unsigned int worldLen = at<uint16_t>(ptr); ptr += 2;
|
||||
if (RR->topology->isUpstream(peer->identity())) {
|
||||
const unsigned int endOfWorlds = ptr + worldLen;
|
||||
const unsigned int worldsLen = at<uint16_t>(ptr); ptr += 2;
|
||||
if (RR->topology->shouldAcceptWorldUpdateFrom(peer->address())) {
|
||||
const unsigned int endOfWorlds = ptr + worldsLen;
|
||||
while (ptr < endOfWorlds) {
|
||||
World w;
|
||||
ptr += w.deserialize(*this,ptr);
|
||||
RR->topology->addWorld(w,false);
|
||||
}
|
||||
} else {
|
||||
ptr += worldLen;
|
||||
ptr += worldsLen;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue