mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:17:43 +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) {
|
if (!packet) {
|
||||||
// construct an NLPacket to send to the replicant that has the contents of the received packet
|
// construct an NLPacket to send to the replicant that has the contents of the received packet
|
||||||
packet = NLPacket::create(replicatedType, message.getSize());
|
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());
|
packet->write(message.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -541,8 +548,6 @@ void AvatarMixer::handleAvatarIdentityPacket(QSharedPointer<ReceivedMessage> mes
|
||||||
}
|
}
|
||||||
auto end = usecTimestampNow();
|
auto end = usecTimestampNow();
|
||||||
_handleAvatarIdentityPacketElapsedTime += (end - start);
|
_handleAvatarIdentityPacketElapsedTime += (end - start);
|
||||||
|
|
||||||
optionallyReplicatePacket(*message, *senderNode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AvatarMixer::handleKillAvatarPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer node) {
|
void AvatarMixer::handleKillAvatarPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer node) {
|
||||||
|
|
Loading…
Reference in a new issue