diff options
author | Justin Clarke Casey | 2008-04-23 10:20:38 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-04-23 10:20:38 +0000 |
commit | 24cf685e55595522f7941e5cdd17a0bdedc4e72a (patch) | |
tree | 00b08a3b5696e4f3404b516e44411ed01abfb87a /OpenSim/Region/Environment/Scenes | |
parent | From: Kurt Taylor <krtaylor@us.ibm.com> (diff) | |
download | opensim-SC-24cf685e55595522f7941e5cdd17a0bdedc4e72a.zip opensim-SC-24cf685e55595522f7941e5cdd17a0bdedc4e72a.tar.gz opensim-SC-24cf685e55595522f7941e5cdd17a0bdedc4e72a.tar.bz2 opensim-SC-24cf685e55595522f7941e5cdd17a0bdedc4e72a.tar.xz |
From: Dr Schofield <hud@zurich.ibm.com>
the attached patch fixes http://opensimulator.org/mantis/view.php?id=936
aka load-xml/load-xml2 crashing. problem lies with basic physics not
creating physics actors. the solution was already present in
SceneObjectPart.cs.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-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 | ||