diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs index 850a3cc..391d3f3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs +++ b/OpenSim/Region/Environment/Scenes/SceneXmlLoader.cs | |||
@@ -89,8 +89,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
89 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), | 89 | new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), |
90 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, | 90 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, |
91 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); | 91 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); |
92 | rootPart.PhysActor.LocalID = rootPart.LocalId; | 92 | |
93 | rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); | 93 | // to quote from SceneObjectPart: Basic |
94 | // Physics returns null.. joy joy joy. | ||
95 | if (rootPart.PhysActor != null) | ||
96 | { | ||
97 | rootPart.PhysActor.LocalID = rootPart.LocalId; | ||
98 | rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); | ||
99 | } | ||
94 | } | 100 | } |
95 | primCount++; | 101 | primCount++; |
96 | } | 102 | } |
@@ -193,9 +199,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
193 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, | 199 | new Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, |
194 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); | 200 | rootPart.RotationOffset.Y, rootPart.RotationOffset.Z), UsePhysics); |
195 | 201 | ||
196 | rootPart.PhysActor.LocalID = rootPart.LocalId; | 202 | // to quote from SceneObjectPart: Basic |
197 | 203 | // Physics returns null.. joy joy joy. | |
198 | rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); | 204 | if (rootPart.PhysActor != null) |
205 | { | ||
206 | rootPart.PhysActor.LocalID = rootPart.LocalId; | ||
207 | rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); | ||
208 | } | ||
199 | rootPart.Velocity = receivedVelocity; | 209 | rootPart.Velocity = receivedVelocity; |
200 | } | 210 | } |
201 | 211 | ||