aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-06-17 17:23:00 +0000
committerJustin Clarke Casey2008-06-17 17:23:00 +0000
commit33d32355a1712e53f402eab1aa4818712f6f5f2c (patch)
tree67196be9550d26bad6deeff5e485094dc8619e44 /OpenSim/Region/Environment/Modules
parentUpdate svn properties. (diff)
downloadopensim-SC_OLD-33d32355a1712e53f402eab1aa4818712f6f5f2c.zip
opensim-SC_OLD-33d32355a1712e53f402eab1aa4818712f6f5f2c.tar.gz
opensim-SC_OLD-33d32355a1712e53f402eab1aa4818712f6f5f2c.tar.bz2
opensim-SC_OLD-33d32355a1712e53f402eab1aa4818712f6f5f2c.tar.xz
* refactor: Remove largely duplicate code from SceneXmlLoader.CreatePrimFromXml2()
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs26
1 files changed, 1 insertions, 25 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
index 69f1902..5591ddc 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
@@ -195,33 +195,9 @@ namespace OpenSim.Region.Environment.Scenes
195 { 195 {
196 SceneObjectGroup obj = new SceneObjectGroup(xmlData); 196 SceneObjectGroup obj = new SceneObjectGroup(xmlData);
197 197
198 LLVector3 receivedVelocity = obj.RootPart.Velocity;
199 //System.Console.WriteLine(obj.RootPart.Velocity.ToString());
200 scene.AddSceneObjectFromStorage(obj); 198 scene.AddSceneObjectFromStorage(obj);
201 199
202 SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); 200 obj.ApplyPhysics(scene.m_physicalPrim);
203 bool UsePhysics = (((rootPart.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) > 0) &&
204 scene.m_physicalPrim);
205 if ((rootPart.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Phantom) == 0)
206 {
207 rootPart.PhysActor = scene.PhysicsScene.AddPrimShape(
208 rootPart.Name,
209 rootPart.Shape,
210 new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y,
211 rootPart.AbsolutePosition.Z),
212 new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
213 new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
214 rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics);
215
216 // to quote from SceneObjectPart: Basic
217 // Physics returns null.. joy joy joy.
218 if (rootPart.PhysActor != null)
219 {
220 rootPart.PhysActor.LocalID = rootPart.LocalId;
221 rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
222 }
223 rootPart.Velocity = receivedVelocity;
224 }
225 201
226 obj.ScheduleGroupForFullUpdate(); 202 obj.ScheduleGroupForFullUpdate();
227 } 203 }