Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 31 files). Show all
Unified · Split
| @@ -79,7 +79,6 @@ EntityScriptServer::EntityScriptServer(ReceivedMessage& message) : ThreadedAssig · 78 unmodified lines | ||
| 79 | 79 | auto& packetReceiver = DependencyManager::get<NodeList>()->getPacketReceiver(); |
| 80 | 80 | packetReceiver.registerListenerForTypes({ PacketType::OctreeStats, PacketType::EntityData, PacketType::EntityErase }, |
| 81 | 81 | this, "handleOctreePacket"); |
| 82 | − packetReceiver.registerListener(PacketType::Jurisdiction, this, "handleJurisdictionPacket"); | |
| 83 | 82 | packetReceiver.registerListener(PacketType::SelectedAudioFormat, this, "handleSelectedAudioFormat"); |
| 84 | 83 | |
| 85 | 84 | auto avatarHashMap = DependencyManager::set<AvatarHashMap>(); |
| @@ -283,11 +282,8 @@ void EntityScriptServer::run() { · 197 unmodified lines | ||
| 283 | 282 | // Setup Script Engine |
| 284 | 283 | resetEntitiesScriptEngine(); |
| 285 | 284 | |
| 286 | − // we need to make sure that init has been called for our EntityScriptingInterface | |
| 287 | − // so that it actually has a jurisdiction listener when we ask it for it next | |
| 288 | 285 | auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>(); |
| 289 | 286 | entityScriptingInterface->init(); |
| 290 | − _entityViewer.setJurisdictionListener(entityScriptingInterface->getJurisdictionListener()); | |
| 291 | 287 | |
| 292 | 288 | _entityViewer.init(); |
| 293 | 289 | |
| @@ -566,17 +562,6 @@ void EntityScriptServer::handleOctreePacket(QSharedPointer<ReceivedMessage> mess · 272 unmodified lines | ||
| 566 | 562 | } |
| 567 | 563 | } |
| 568 | 564 | |
| 569 | −void EntityScriptServer::handleJurisdictionPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode) { | |
| 570 | − NodeType_t nodeType; | |
| 571 | − message->peekPrimitive(&nodeType); | |
| 572 | − | |
| 573 | − // PacketType_JURISDICTION, first byte is the node type... | |
| 574 | − if (nodeType == NodeType::EntityServer) { | |
| 575 | − DependencyManager::get<EntityScriptingInterface>()->getJurisdictionListener()-> | |
| 576 | − queueReceivedPacket(message, senderNode); | |
| 577 | − } | |
| 578 | −} | |
| 579 | − | |
| 580 | 565 | void EntityScriptServer::aboutToFinish() { |
| 581 | 566 | shutdownScriptEngine(); |
| 582 | 567 | |