From bb5b396fc5ac15d7451df407e75c2ca99c0b9dd1 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Thu, 18 Aug 2011 15:27:03 -0700 Subject: Fix exception when using BasicPhysics --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 7778ebc..a0e87d0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1603,7 +1603,6 @@ namespace OpenSim.Region.Framework.Scenes RotationOffset, RigidBody, m_localId); - PhysActor.SetMaterial(Material); } catch { @@ -1615,6 +1614,7 @@ namespace OpenSim.Region.Framework.Scenes { PhysActor.SOPName = this.Name; // save object name and desc into the PhysActor so ODE internals know the joint/body info PhysActor.SOPDescription = this.Description; + PhysActor.SetMaterial(Material); DoPhysicsPropertyUpdate(RigidBody, true); PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); } @@ -4530,11 +4530,11 @@ namespace OpenSim.Region.Framework.Scenes RotationOffset, UsePhysics, m_localId); - PhysActor.SetMaterial(Material); pa = PhysActor; if (pa != null) { + PhysActor.SetMaterial(Material); DoPhysicsPropertyUpdate(UsePhysics, true); if (m_parentGroup != null) -- cgit v1.1