mirror of
https://github.com/overte-org/overte.git
synced 2025-08-15 07:57:23 +02:00
Fixed banning users: it didn't work because we tried to send a Reliable packet using sendUnreliablePacket()
This commit is contained in:
parent
7f285c5f90
commit
e610443353
1 changed files with 8 additions and 2 deletions
|
@ -769,8 +769,14 @@ unsigned int LimitedNodeList::broadcastToNodes(std::unique_ptr<NLPacket> packet,
|
|||
|
||||
eachNode([&](const SharedNodePointer& node){
|
||||
if (node && destinationNodeTypes.contains(node->getType())) {
|
||||
sendUnreliablePacket(*packet, *node);
|
||||
++n;
|
||||
if (packet->isReliable()) {
|
||||
auto packet1 = NLPacket::createCopy(*packet);
|
||||
sendPacket(std::move(packet1), *node);
|
||||
}
|
||||
else {
|
||||
sendUnreliablePacket(*packet, *node);
|
||||
}
|
||||
++n;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue