Merge pull request #4704 from sethalves/assignment-scripts-can-rez

Assignment scripts can rez
This commit is contained in:
Philip Rosedale 2015-04-28 12:15:19 -07:00
commit 20d77fae3c

View file

@ -504,7 +504,7 @@ void DomainServer::populateStaticScriptedAssignmentsFromSettings() {
Assignment::AgentType,
scriptPool);
scriptAssignment->setPayload(scriptURL.toUtf8());
// add it to static hash so we know we have to keep giving it back out
addStaticAssignmentToAssignmentHash(scriptAssignment);
}
@ -675,6 +675,10 @@ void DomainServer::handleConnectRequest(const QByteArray& packet, const HifiSock
nodeData->setAssignmentUUID(matchingQueuedAssignment->getUUID());
nodeData->setWalletUUID(pendingAssigneeData->getWalletUUID());
// always allow assignment clients to create and destroy entities
newNode->setCanAdjustLocks(true);
newNode->setCanRez(true);
// now that we've pulled the wallet UUID and added the node to our list, delete the pending assignee data
delete pendingAssigneeData;
}
@ -2119,10 +2123,10 @@ SharedAssignmentPointer DomainServer::deployableAssignmentForRequest(const Assig
Assignment* assignment = sharedAssignment->data();
bool requestIsAllTypes = requestAssignment.getType() == Assignment::AllTypes;
bool assignmentTypesMatch = assignment->getType() == requestAssignment.getType();
bool nietherHasPool = assignment->getPool().isEmpty() && requestAssignment.getPool().isEmpty();
bool neitherHasPool = assignment->getPool().isEmpty() && requestAssignment.getPool().isEmpty();
bool assignmentPoolsMatch = assignment->getPool() == requestAssignment.getPool();
if ((requestIsAllTypes || assignmentTypesMatch) && (nietherHasPool || assignmentPoolsMatch)) {
if ((requestIsAllTypes || assignmentTypesMatch) && (neitherHasPool || assignmentPoolsMatch)) {
// remove the assignment from the queue
SharedAssignmentPointer deployableAssignment = _unfulfilledAssignments.takeAt(sharedAssignment