diff options
author | Teravus Ovares | 2008-05-08 19:22:20 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-08 19:22:20 +0000 |
commit | 4b924f2eb6e796b696d94ec0dcf9865b1e4a8e49 (patch) | |
tree | 3363314b595e99eb5f2aac98985ac2437002660e | |
parent | * Removed ODELock message since it wasn't telling us anything important and p... (diff) | |
download | opensim-SC-4b924f2eb6e796b696d94ec0dcf9865b1e4a8e49.zip opensim-SC-4b924f2eb6e796b696d94ec0dcf9865b1e4a8e49.tar.gz opensim-SC-4b924f2eb6e796b696d94ec0dcf9865b1e4a8e49.tar.bz2 opensim-SC-4b924f2eb6e796b696d94ec0dcf9865b1e4a8e49.tar.xz |
* Committing an extra bit of permissions for attaching to ensure that the perms are in line with project goals.
-rw-r--r-- | OpenSim/Framework/PrimitiveBaseShape.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 69 |
2 files changed, 39 insertions, 35 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index aabd69d..58a7ec6 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -425,10 +425,7 @@ namespace OpenSim.Framework | |||
425 | int totalLength = 1; | 425 | int totalLength = 1; |
426 | byte extraParamCount = data[i++]; | 426 | byte extraParamCount = data[i++]; |
427 | 427 | ||
428 | if (extraParamCount > 0) | 428 | |
429 | { | ||
430 | int foo = 0; | ||
431 | } | ||
432 | for (int k = 0; k < extraParamCount; k++) | 429 | for (int k = 0; k < extraParamCount; k++) |
433 | { | 430 | { |
434 | ushort epType = Helpers.BytesToUInt16(data, i); | 431 | ushort epType = Helpers.BytesToUInt16(data, i); |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 9d4119d..7ffddb3 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -338,6 +338,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
338 | public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot) | 338 | public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot) |
339 | { | 339 | { |
340 | // Calls attach with a Zero position | 340 | // Calls attach with a Zero position |
341 | |||
341 | AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero); | 342 | AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero); |
342 | } | 343 | } |
343 | public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask) | 344 | public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask) |
@@ -393,46 +394,52 @@ namespace OpenSim.Region.Environment.Scenes | |||
393 | if (((SceneObjectGroup)obj).LocalId == objectLocalID) | 394 | if (((SceneObjectGroup)obj).LocalId == objectLocalID) |
394 | { | 395 | { |
395 | SceneObjectGroup group = (SceneObjectGroup)obj; | 396 | SceneObjectGroup group = (SceneObjectGroup)obj; |
396 | 397 | if (m_parentScene.Permissions.CanEditObject(remoteClient.AgentId, obj.UUID)) | |
397 | // If the attachment point isn't the same as the one previously used | ||
398 | // set it's offset position = 0 so that it appears on the attachment point | ||
399 | // and not in a weird location somewhere unknown. | ||
400 | if (AttachmentPt != 0 && AttachmentPt != (uint)group.GetAttachmentPoint()) | ||
401 | { | 398 | { |
399 | // If the attachment point isn't the same as the one previously used | ||
400 | // set it's offset position = 0 so that it appears on the attachment point | ||
401 | // and not in a weird location somewhere unknown. | ||
402 | if (AttachmentPt != 0 && AttachmentPt != (uint)group.GetAttachmentPoint()) | ||
403 | { | ||
402 | 404 | ||
403 | attachPos = LLVector3.Zero; | 405 | attachPos = LLVector3.Zero; |
404 | } | 406 | } |
405 | 407 | ||
406 | // AttachmentPt 0 means the client chose to 'wear' the attachment. | 408 | // AttachmentPt 0 means the client chose to 'wear' the attachment. |
407 | if (AttachmentPt == 0) | 409 | if (AttachmentPt == 0) |
408 | { | 410 | { |
409 | |||
410 | // Check object for stored attachment point | ||
411 | AttachmentPt = (uint)group.GetAttachmentPoint(); | ||
412 | |||
413 | 411 | ||
414 | } | 412 | // Check object for stored attachment point |
413 | AttachmentPt = (uint)group.GetAttachmentPoint(); | ||
415 | 414 | ||
416 | // if we still didn't find a suitable attachment point....... | 415 | |
417 | if (AttachmentPt == 0) | 416 | } |
418 | { | 417 | |
419 | // Stick it on left hand with Zero Offset from the attachment point. | 418 | // if we still didn't find a suitable attachment point....... |
420 | AttachmentPt = (uint)AttachmentPoint.LeftHand; | 419 | if (AttachmentPt == 0) |
421 | attachPos = LLVector3.Zero; | 420 | { |
422 | } | 421 | // Stick it on left hand with Zero Offset from the attachment point. |
422 | AttachmentPt = (uint)AttachmentPoint.LeftHand; | ||
423 | attachPos = LLVector3.Zero; | ||
424 | } | ||
423 | m_log.Debug("[ATTACH]: Using attachpoint: " + AttachmentPt.ToString()); | 425 | m_log.Debug("[ATTACH]: Using attachpoint: " + AttachmentPt.ToString()); |
424 | |||
425 | |||
426 | 426 | ||
427 | // Saves and gets assetID | ||
428 | if (group.GetFromAssetID() == LLUUID.Zero) | ||
429 | { | ||
430 | LLUUID newAssetID = m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId); | ||
431 | 427 | ||
432 | // sets assetID so client can show asset as 'attached' in inventory | 428 | |
433 | group.SetFromAssetID(newAssetID); | 429 | // Saves and gets assetID |
430 | if (group.GetFromAssetID() == LLUUID.Zero) | ||
431 | { | ||
432 | LLUUID newAssetID = m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId); | ||
433 | |||
434 | // sets assetID so client can show asset as 'attached' in inventory | ||
435 | group.SetFromAssetID(newAssetID); | ||
436 | } | ||
437 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos); | ||
438 | } | ||
439 | else | ||
440 | { | ||
441 | remoteClient.SendAgentAlertMessage("You don't have sufficient permissions to attach this object", false); | ||
434 | } | 442 | } |
435 | group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos); | ||
436 | 443 | ||
437 | } | 444 | } |
438 | 445 | ||