Fix exception when using BasicPhysics

bulletsim
Robert Adams 2011-08-18 15:27:03 -07:00 committed by Justin Clark-Casey (justincc)
parent c9e6b7bd10
commit bb5b396fc5
1 changed files with 2 additions and 2 deletions

View File

@ -1603,7 +1603,6 @@ namespace OpenSim.Region.Framework.Scenes
RotationOffset, RotationOffset,
RigidBody, RigidBody,
m_localId); m_localId);
PhysActor.SetMaterial(Material);
} }
catch 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.SOPName = this.Name; // save object name and desc into the PhysActor so ODE internals know the joint/body info
PhysActor.SOPDescription = this.Description; PhysActor.SOPDescription = this.Description;
PhysActor.SetMaterial(Material);
DoPhysicsPropertyUpdate(RigidBody, true); DoPhysicsPropertyUpdate(RigidBody, true);
PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0);
} }
@ -4530,11 +4530,11 @@ namespace OpenSim.Region.Framework.Scenes
RotationOffset, RotationOffset,
UsePhysics, UsePhysics,
m_localId); m_localId);
PhysActor.SetMaterial(Material);
pa = PhysActor; pa = PhysActor;
if (pa != null) if (pa != null)
{ {
PhysActor.SetMaterial(Material);
DoPhysicsPropertyUpdate(UsePhysics, true); DoPhysicsPropertyUpdate(UsePhysics, true);
if (m_parentGroup != null) if (m_parentGroup != null)