예제 #1
0
void EntityScriptServer::handleReloadEntityServerScriptPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode) {
    if (senderNode->getCanRez() || senderNode->getCanRezTmp() || senderNode->getCanRezCertified() || senderNode->getCanRezTmpCertified()) {
        auto entityID = QUuid::fromRfc4122(message->read(NUM_BYTES_RFC4122_UUID));

        if (_entityViewer.getTree() && !_shuttingDown) {
            qCDebug(entity_script_server) << "Reloading: " << entityID;
            _entitiesScriptEngine->unloadEntityScript(entityID);
            checkAndCallPreload(entityID, true);
        }
    }
}
예제 #2
0
void EntityScriptServer::handleReloadEntityServerScriptPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode) {
    // These are temporary checks until we can ensure that nodes eventually disconnect if the Domain Server stops telling them
    // about each other.
    if (senderNode->getCanRez() || senderNode->getCanRezTmp() || senderNode->getCanRezCertified() || senderNode->getCanRezTmpCertified()) {
        auto entityID = QUuid::fromRfc4122(message->read(NUM_BYTES_RFC4122_UUID));

        if (_entityViewer.getTree() && !_shuttingDown) {
            qCDebug(entity_script_server) << "Reloading: " << entityID;
            _entitiesScriptEngine->unloadEntityScript(entityID);
            checkAndCallPreload(entityID, true);
        }
    }
}
예제 #3
0
void EntityScriptServer::entityServerScriptChanging(const EntityItemID& entityID, bool reload) {
    if (_entityViewer.getTree() && !_shuttingDown) {
        _entitiesScriptEngine->unloadEntityScript(entityID, true);
        checkAndCallPreload(entityID, reload);
    }
}
예제 #4
0
void EntityScriptServer::addingEntity(const EntityItemID& entityID) {
    checkAndCallPreload(entityID);
}