aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Primitive.cs
diff options
context:
space:
mode:
authorMW2007-07-13 16:12:38 +0000
committerMW2007-07-13 16:12:38 +0000
commitfcc7f86427f14f9a43a918f30cdf97b438c49a77 (patch)
treeaad3ff8beb98e63365db9b6982fff14817aad2f6 /OpenSim/Region/Environment/Scenes/Primitive.cs
parentrename file to not have spaces in it (diff)
downloadopensim-SC-fcc7f86427f14f9a43a918f30cdf97b438c49a77.zip
opensim-SC-fcc7f86427f14f9a43a918f30cdf97b438c49a77.tar.gz
opensim-SC-fcc7f86427f14f9a43a918f30cdf97b438c49a77.tar.bz2
opensim-SC-fcc7f86427f14f9a43a918f30cdf97b438c49a77.tar.xz
Changed simpleApp to use basic physics.
Done some work of fixing primitive/SceneObject copying. Set DefaultHome region to 1000,1000.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Primitive.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs
index 4bb43d2..53314e3 100644
--- a/OpenSim/Region/Environment/Scenes/Primitive.cs
+++ b/OpenSim/Region/Environment/Scenes/Primitive.cs
@@ -139,7 +139,7 @@ namespace OpenSim.Region.Environment.Scenes
139 this.m_isRootPrim = isRoot; 139 this.m_isRootPrim = isRoot;
140 this.m_RootParent = rootObject; 140 this.m_RootParent = rootObject;
141 141
142 this.CreateFromPacket(ownerID, localID, pos, shape); 142 this.CreateFromShape(ownerID, localID, pos, shape);
143 this.Rotation = Axiom.Math.Quaternion.Identity; 143 this.Rotation = Axiom.Math.Quaternion.Identity;
144 } 144 }
145 145
@@ -164,14 +164,22 @@ namespace OpenSim.Region.Environment.Scenes
164 dupe.m_Parent = parent; 164 dupe.m_Parent = parent;
165 dupe.m_RootParent = rootParent; 165 dupe.m_RootParent = rootParent;
166 // TODO: Copy this properly. 166 // TODO: Copy this properly.
167 dupe.m_Shape = this.m_Shape; 167 dupe.m_Shape = this.m_Shape.Copy();
168 168 dupe.children = new List<EntityBase>();
169 uint newLocalID = this.m_world.PrimIDAllocate(); 169 uint newLocalID = this.m_world.PrimIDAllocate();
170 dupe.uuid = LLUUID.Random();
170 dupe.LocalId = newLocalID; 171 dupe.LocalId = newLocalID;
171 172
172 dupe.Scale = new LLVector3(this.Scale.X, this.Scale.Y, this.Scale.Z); 173 dupe.Scale = new LLVector3(this.Scale.X, this.Scale.Y, this.Scale.Z);
173 dupe.Rotation = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z); 174 dupe.Rotation = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z);
174 dupe.Pos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z); 175 dupe.Pos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z);
176 rootParent.AddChildToList(dupe);
177
178 foreach (Primitive prim in this.children)
179 {
180 Primitive primClone = prim.Copy(this, rootParent);
181 dupe.children.Add(primClone);
182 }
175 183
176 return dupe; 184 return dupe;
177 } 185 }
@@ -210,7 +218,7 @@ namespace OpenSim.Region.Environment.Scenes
210 /// <param name="addPacket"></param> 218 /// <param name="addPacket"></param>
211 /// <param name="ownerID"></param> 219 /// <param name="ownerID"></param>
212 /// <param name="localID"></param> 220 /// <param name="localID"></param>
213 public void CreateFromPacket(LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) 221 public void CreateFromShape(LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
214 { 222 {
215 this.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 223 this.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
216 this.OwnerID = ownerID; 224 this.OwnerID = ownerID;