mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 11:08:06 +02:00
make sure kill packet has node ID
This commit is contained in:
parent
b7d8c173c1
commit
6fc1045ee9
1 changed files with 7 additions and 2 deletions
|
@ -150,6 +150,13 @@ void AvatarMixer::optionallyReplicatePacket(ReceivedMessage& message, const Node
|
|||
if (!packet) {
|
||||
// construct an NLPacket to send to the replicant that has the contents of the received packet
|
||||
packet = NLPacket::create(replicatedType, message.getSize());
|
||||
|
||||
if (message.getType() == PacketType::KillAvatar) {
|
||||
// this was not a replicated packet originally, we need to prepend the session ID
|
||||
// for the killed node
|
||||
packet->write(node->getUUID().toRfc4122());
|
||||
}
|
||||
|
||||
packet->write(message.getMessage());
|
||||
}
|
||||
|
||||
|
@ -541,8 +548,6 @@ void AvatarMixer::handleAvatarIdentityPacket(QSharedPointer<ReceivedMessage> mes
|
|||
}
|
||||
auto end = usecTimestampNow();
|
||||
_handleAvatarIdentityPacketElapsedTime += (end - start);
|
||||
|
||||
optionallyReplicatePacket(*message, *senderNode);
|
||||
}
|
||||
|
||||
void AvatarMixer::handleKillAvatarPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer node) {
|
||||
|
|
Loading…
Reference in a new issue