aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMW2007-07-01 21:45:47 +0000
committerMW2007-07-01 21:45:47 +0000
commit7f18f494f1200f0f6470020a794e5291124f3ead (patch)
tree3807166ff2432b3b5c7d9913ecabff8103175757 /OpenSim
parent* removed try-catchall from scene constructor (diff)
downloadopensim-SC-7f18f494f1200f0f6470020a794e5291124f3ead.zip
opensim-SC-7f18f494f1200f0f6470020a794e5291124f3ead.tar.gz
opensim-SC-7f18f494f1200f0f6470020a794e5291124f3ead.tar.bz2
opensim-SC-7f18f494f1200f0f6470020a794e5291124f3ead.tar.xz
Just committing this because I want my commit to be on the front page of www.opensimulator.org rather than lbsa71's being there.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/General/Types/PrimitiveBaseShape.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/Primitive.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObject.cs15
3 files changed, 18 insertions, 8 deletions
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
index 7c8de16..584bc9b 100644
--- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
@@ -16,12 +16,13 @@ namespace OpenSim.Framework.Types
16 Torus, 16 Torus,
17 Prism, 17 Prism,
18 Scuplted, 18 Scuplted,
19 Cylinder 19 Cylinder,
20 Unknown
20 } 21 }
21 22
22 public class PrimitiveBaseShape 23 public class PrimitiveBaseShape
23 { 24 {
24 private ShapeType type; 25 private ShapeType type = ShapeType.Unknown;
25 26
26 public byte PCode; 27 public byte PCode;
27 public ushort PathBegin; 28 public ushort PathBegin;
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs
index dd8bb02..b8ec68b 100644
--- a/OpenSim/Region/Environment/Scenes/Primitive.cs
+++ b/OpenSim/Region/Environment/Scenes/Primitive.cs
@@ -94,7 +94,7 @@ namespace OpenSim.Region.Environment.Scenes
94 /// </summary> 94 /// </summary>
95 public override void update() 95 public override void update()
96 { 96 {
97 if (this.updateFlag == 1) // is a new prim just been created/reloaded 97 if (this.updateFlag == 1) // is a new prim just been created/reloaded or has major changes
98 { 98 {
99 this.SendFullUpdateToAllClients(); 99 this.SendFullUpdateToAllClients();
100 this.updateFlag = 0; 100 this.updateFlag = 0;
@@ -151,7 +151,7 @@ namespace OpenSim.Region.Environment.Scenes
151 this.updateFlag = 1; 151 this.updateFlag = 1;
152 } 152 }
153 153
154 public void AddToChildren(SceneObject linkObject) 154 public void AddNewChildren(SceneObject linkObject)
155 { 155 {
156 // Console.WriteLine("linking new prims " + linkObject.rootLocalID + " to me (" + this.LocalId + ")"); 156 // Console.WriteLine("linking new prims " + linkObject.rootLocalID + " to me (" + this.LocalId + ")");
157 //TODO check permissions 157 //TODO check permissions
@@ -159,7 +159,7 @@ namespace OpenSim.Region.Environment.Scenes
159 linkObject.rootPrimitive.SetNewParent(this, this.m_RootParent); 159 linkObject.rootPrimitive.SetNewParent(this, this.m_RootParent);
160 160
161 this.m_world.DeleteEntity(linkObject.rootUUID); 161 this.m_world.DeleteEntity(linkObject.rootUUID);
162 linkObject.rootPrimitive = null; 162 linkObject.DeleteAllChildren();
163 } 163 }
164 164
165 public void SetNewParent(Primitive newParent, SceneObject rootParent) 165 public void SetNewParent(Primitive newParent, SceneObject rootParent)
diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs
index 2c55a7d..c03354e 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObject.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Scenes
74 m_regionHandle = regionHandle; 74 m_regionHandle = regionHandle;
75 m_world = world; 75 m_world = world;
76 this.Pos = addPacket.ObjectData.RayEnd; 76 this.Pos = addPacket.ObjectData.RayEnd;
77 this.CreateFromPacket(addPacket, ownerID, localID); 77 this.CreateRootFromPacket(addPacket, ownerID, localID);
78 78
79 } 79 }
80 /// <summary> 80 /// <summary>
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Environment.Scenes
83 /// <param name="addPacket"></param> 83 /// <param name="addPacket"></param>
84 /// <param name="agentID"></param> 84 /// <param name="agentID"></param>
85 /// <param name="localID"></param> 85 /// <param name="localID"></param>
86 public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID agentID, uint localID) 86 public void CreateRootFromPacket(ObjectAddPacket addPacket, LLUUID agentID, uint localID)
87 { 87 {
88 this.rootPrimitive = new Primitive( this.m_regionHandle, this.m_world, addPacket, agentID, localID, true, this, this); 88 this.rootPrimitive = new Primitive( this.m_regionHandle, this.m_world, addPacket, agentID, localID, true, this, this);
89 this.children.Add(rootPrimitive); 89 this.children.Add(rootPrimitive);
@@ -99,6 +99,15 @@ namespace OpenSim.Region.Environment.Scenes
99 99
100 } 100 }
101 101
102 /// <summary>
103 ///
104 /// </summary>
105 public void DeleteAllChildren()
106 {
107 this.children.Clear();
108 this.ChildPrimitives.Clear();
109 this.rootPrimitive = null;
110 }
102 111
103 /// <summary> 112 /// <summary>
104 /// 113 ///
@@ -106,7 +115,7 @@ namespace OpenSim.Region.Environment.Scenes
106 /// <param name="primObject"></param> 115 /// <param name="primObject"></param>
107 public void AddNewChildPrims(SceneObject primObject) 116 public void AddNewChildPrims(SceneObject primObject)
108 { 117 {
109 this.rootPrimitive.AddToChildren(primObject); 118 this.rootPrimitive.AddNewChildren(primObject);
110 } 119 }
111 120
112 /// <summary> 121 /// <summary>