aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs101
1 files changed, 80 insertions, 21 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 04bdf5a..501f519 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -443,7 +443,12 @@ namespace OpenSim.Region.Environment.Scenes
443 { 443 {
444 SceneObjectGroup group = GetGroupByPrim(localID); 444 SceneObjectGroup group = GetGroupByPrim(localID);
445 if (group != null) 445 if (group != null)
446 group.Resize(scale, localID); 446 {
447 if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID))
448 {
449 group.Resize(scale, localID);
450 }
451 }
447 } 452 }
448 453
449 /// <summary> 454 /// <summary>
@@ -473,7 +478,12 @@ namespace OpenSim.Region.Environment.Scenes
473 { 478 {
474 SceneObjectGroup group = GetGroupByPrim(localID); 479 SceneObjectGroup group = GetGroupByPrim(localID);
475 if (group != null) 480 if (group != null)
476 group.UpdateSingleRotation(rot, localID); 481 {
482 if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID))
483 {
484 group.UpdateSingleRotation(rot, localID);
485 }
486 }
477 } 487 }
478 488
479 /// <summary> 489 /// <summary>
@@ -486,7 +496,12 @@ namespace OpenSim.Region.Environment.Scenes
486 { 496 {
487 SceneObjectGroup group = GetGroupByPrim(localID); 497 SceneObjectGroup group = GetGroupByPrim(localID);
488 if (group != null) 498 if (group != null)
489 group.UpdateGroupRotation(rot); 499 {
500 if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID))
501 {
502 group.UpdateGroupRotation(rot);
503 }
504 }
490 } 505 }
491 506
492 /// <summary> 507 /// <summary>
@@ -500,14 +515,24 @@ namespace OpenSim.Region.Environment.Scenes
500 { 515 {
501 SceneObjectGroup group = GetGroupByPrim(localID); 516 SceneObjectGroup group = GetGroupByPrim(localID);
502 if (group != null) 517 if (group != null)
503 group.UpdateGroupRotation(pos, rot); 518 {
519 if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID))
520 {
521 group.UpdateGroupRotation(pos, rot);
522 }
523 }
504 } 524 }
505 525
506 public void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 526 public void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient)
507 { 527 {
508 SceneObjectGroup group = GetGroupByPrim(localID); 528 SceneObjectGroup group = GetGroupByPrim(localID);
509 if (group != null) 529 if (group != null)
510 group.UpdateSinglePosition(pos, localID); 530 {
531 if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID))
532 {
533 group.UpdateSinglePosition(pos, localID);
534 }
535 }
511 } 536 }
512 537
513 /// <summary> 538 /// <summary>
@@ -520,7 +545,12 @@ namespace OpenSim.Region.Environment.Scenes
520 { 545 {
521 SceneObjectGroup group = GetGroupByPrim(localID); 546 SceneObjectGroup group = GetGroupByPrim(localID);
522 if (group != null) 547 if (group != null)
523 group.UpdateGroupPosition(pos); 548 {
549 if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID))
550 {
551 group.UpdateGroupPosition(pos);
552 }
553 }
524 } 554 }
525 555
526 /// <summary> 556 /// <summary>
@@ -533,7 +563,12 @@ namespace OpenSim.Region.Environment.Scenes
533 { 563 {
534 SceneObjectGroup group = GetGroupByPrim(localID); 564 SceneObjectGroup group = GetGroupByPrim(localID);
535 if (group != null) 565 if (group != null)
536 group.UpdateTextureEntry(localID, texture); 566 {
567 if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID))
568 {
569 group.UpdateTextureEntry(localID, texture);
570 }
571 }
537 } 572 }
538 573
539 /// <summary> 574 /// <summary>
@@ -546,17 +581,24 @@ namespace OpenSim.Region.Environment.Scenes
546 { 581 {
547 SceneObjectGroup group = GetGroupByPrim(localID); 582 SceneObjectGroup group = GetGroupByPrim(localID);
548 if (group != null) 583 if (group != null)
549 group.UpdatePrimFlags(localID, (ushort)packet.Type, true, packet.ToBytes()); 584 {
550 //System.Console.WriteLine("Got primupdate packet: " + packet.UsePhysics.ToString()); 585 if (PermissionsMngr.CanEditObject(remoteClient.AgentId, group.UUID))
586 {
587 group.UpdatePrimFlags(localID, (ushort)packet.Type, true, packet.ToBytes());
588 }
589 }
590
551 } 591 }
552 592
553 public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) 593 public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
554 { 594 {
555 if (PermissionsMngr.CanEditObject(remoteClient.AgentId, objectID) || PermissionsMngr.AnyoneCanMovePermission(remoteClient.AgentId, objectID)) 595 SceneObjectGroup group = GetGroupByPrim(objectID);
596 if (group != null)
556 { 597 {
557 SceneObjectGroup group = GetGroupByPrim(objectID); 598 if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID))
558 if (group != null) 599 {
559 group.GrabMovement(offset, pos, remoteClient); 600 group.GrabMovement(offset, pos, remoteClient);
601 }
560 } 602 }
561 } 603 }
562 604
@@ -565,11 +607,16 @@ namespace OpenSim.Region.Environment.Scenes
565 /// </summary> 607 /// </summary>
566 /// <param name="primLocalID"></param> 608 /// <param name="primLocalID"></param>
567 /// <param name="description"></param> 609 /// <param name="description"></param>
568 public void PrimName(uint primLocalID, string name) 610 public void PrimName(IClientAPI remoteClient, uint primLocalID, string name)
569 { 611 {
570 SceneObjectGroup group = GetGroupByPrim(primLocalID); 612 SceneObjectGroup group = GetGroupByPrim(primLocalID);
571 if (group != null) 613 if (group != null)
572 group.SetPartName(name, primLocalID); 614 {
615 if (PermissionsMngr.CanEditObject(remoteClient.AgentId, group.UUID))
616 {
617 group.SetPartName(name, primLocalID);
618 }
619 }
573 } 620 }
574 621
575 /// <summary> 622 /// <summary>
@@ -577,21 +624,30 @@ namespace OpenSim.Region.Environment.Scenes
577 /// </summary> 624 /// </summary>
578 /// <param name="primLocalID"></param> 625 /// <param name="primLocalID"></param>
579 /// <param name="description"></param> 626 /// <param name="description"></param>
580 public void PrimDescription(uint primLocalID, string description) 627 public void PrimDescription(IClientAPI remoteClient, uint primLocalID, string description)
581 { 628 {
582 SceneObjectGroup group = GetGroupByPrim(primLocalID); 629 SceneObjectGroup group = GetGroupByPrim(primLocalID);
583 if (group != null) 630 if (group != null)
584 group.SetPartDescription(description, primLocalID); 631 {
632 if (PermissionsMngr.CanEditObject(remoteClient.AgentId, group.UUID))
633 {
634 group.SetPartDescription(description, primLocalID);
635 }
636 }
585 } 637 }
586 638
587 public void UpdateExtraParam(LLUUID agentID, uint primLocalID, ushort type, bool inUse, byte[] data) 639 public void UpdateExtraParam(LLUUID agentID, uint primLocalID, ushort type, bool inUse, byte[] data)
588 { 640 {
589 SceneObjectGroup group = GetGroupByPrim(primLocalID); 641 SceneObjectGroup group = GetGroupByPrim(primLocalID);
590 if (this.m_parentScene.PermissionsMngr.CanEditObject(agentID, group.GetPartsFullID(primLocalID))) 642
643 if (group != null)
591 { 644 {
592 if (group != null) 645 if (PermissionsMngr.CanEditObject(agentID, group.UUID))
646 {
593 group.UpdateExtraParam(primLocalID, type, inUse, data); 647 group.UpdateExtraParam(primLocalID, type, inUse, data);
648 }
594 } 649 }
650
595 } 651 }
596 652
597 /// <summary> 653 /// <summary>
@@ -602,10 +658,13 @@ namespace OpenSim.Region.Environment.Scenes
602 public void UpdatePrimShape(LLUUID agentID, uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock) 658 public void UpdatePrimShape(LLUUID agentID, uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock)
603 { 659 {
604 SceneObjectGroup group = GetGroupByPrim(primLocalID); 660 SceneObjectGroup group = GetGroupByPrim(primLocalID);
605 if (this.m_parentScene.PermissionsMngr.CanEditObject(agentID, group.GetPartsFullID(primLocalID))) 661 if (group != null)
606 { 662 {
607 if (group != null) 663 if (PermissionsMngr.CanEditObjectPosition(agentID, group.GetPartsFullID(primLocalID)))
664 {
665
608 group.UpdateShape(shapeBlock, primLocalID); 666 group.UpdateShape(shapeBlock, primLocalID);
667 }
609 } 668 }
610 } 669 }
611 670
@@ -724,7 +783,7 @@ namespace OpenSim.Region.Environment.Scenes
724 783
725 if (originPrim != null) 784 if (originPrim != null)
726 { 785 {
727 if (PermissionsMngr.CanCopyObject(AgentID, originPrim.UUID) || PermissionsMngr.AnyoneCanCopyPermission(AgentID, originPrim.UUID)) 786 if (PermissionsMngr.CanCopyObject(AgentID, originPrim.UUID))
728 { 787 {
729 SceneObjectGroup copy = originPrim.Copy(AgentID, GroupID); 788 SceneObjectGroup copy = originPrim.Copy(AgentID, GroupID);
730 copy.AbsolutePosition = copy.AbsolutePosition + offset; 789 copy.AbsolutePosition = copy.AbsolutePosition + offset;