Update Agent to use peekPrimitive

This commit is contained in:
Ryan Huffman 2015-07-14 14:23:31 -07:00
parent 64bed72ae6
commit 5cb8c1541a

View file

@ -88,14 +88,12 @@ void Agent::handleOctreePacket(QSharedPointer<NLPacket> packet, SharedNodePointe
void Agent::handleJurisdictionPacket(QSharedPointer<NLPacket> packet, SharedNodePointer senderNode) { void Agent::handleJurisdictionPacket(QSharedPointer<NLPacket> packet, SharedNodePointer senderNode) {
NodeType_t nodeType; NodeType_t nodeType;
packet->peek(reinterpret_cast<char*>(&nodeType), sizeof(nodeType)); packet->peekPrimitive(&nodeType);
// PacketType_JURISDICTION, first byte is the node type... // PacketType_JURISDICTION, first byte is the node type...
switch (nodeType) { if (nodeType == NodeType::EntityServer) {
case NodeType::EntityServer:
DependencyManager::get<EntityScriptingInterface>()->getJurisdictionListener()-> DependencyManager::get<EntityScriptingInterface>()->getJurisdictionListener()->
queueReceivedPacket(packet, senderNode); queueReceivedPacket(packet, senderNode);
break;
} }
} }