[Client] Use the correct guid for a received WorldEvent or ActorList

This commit is contained in:
David Cernat 2018-03-21 06:08:04 +02:00
parent 14f0299322
commit bbdc30628b
2 changed files with 3 additions and 1 deletions

View file

@ -15,6 +15,7 @@ bool ActorProcessor::Process(RakNet::Packet &packet, ActorList &actorList)
{ {
RakNet::BitStream bsIn(&packet.data[1], packet.length, false); RakNet::BitStream bsIn(&packet.data[1], packet.length, false);
bsIn.Read(guid); bsIn.Read(guid);
actorList.guid = guid;
ActorPacket *myPacket = Main::get().getNetworking()->getActorPacket(packet.data[0]); ActorPacket *myPacket = Main::get().getNetworking()->getActorPacket(packet.data[0]);
@ -44,4 +45,4 @@ bool ActorProcessor::Process(RakNet::Packet &packet, ActorList &actorList)
} }
} }
return false; return false;
} }

View file

@ -15,6 +15,7 @@ bool WorldProcessor::Process(RakNet::Packet &packet, WorldEvent &event)
{ {
RakNet::BitStream bsIn(&packet.data[1], packet.length, false); RakNet::BitStream bsIn(&packet.data[1], packet.length, false);
bsIn.Read(guid); bsIn.Read(guid);
event.guid = guid;
WorldPacket *myPacket = Main::get().getNetworking()->getWorldPacket(packet.data[0]); WorldPacket *myPacket = Main::get().getNetworking()->getWorldPacket(packet.data[0]);