Remove physics actor related race conditions in SetVehicleFlags() and SetPhysicsAxisRotation()
sop.PhysActor can currently become null at any time.0.7.3-extended
parent
f25efa291d
commit
28daec7f4e
|
@ -3314,10 +3314,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void SetVehicleFlags(int param, bool remove)
|
public void SetVehicleFlags(int param, bool remove)
|
||||||
{
|
{
|
||||||
if (PhysActor != null)
|
PhysicsActor pa = PhysActor;
|
||||||
{
|
|
||||||
PhysActor.VehicleFlags(param, remove);
|
if (pa != null)
|
||||||
}
|
pa.VehicleFlags(param, remove);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetGroup(UUID groupID, IClientAPI client)
|
public void SetGroup(UUID groupID, IClientAPI client)
|
||||||
|
@ -3349,10 +3349,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void SetPhysicsAxisRotation()
|
public void SetPhysicsAxisRotation()
|
||||||
{
|
{
|
||||||
if (PhysActor != null)
|
PhysicsActor pa = PhysActor;
|
||||||
|
|
||||||
|
if (pa != null)
|
||||||
{
|
{
|
||||||
PhysActor.LockAngularMotion(RotationAxis);
|
pa.LockAngularMotion(RotationAxis);
|
||||||
ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
|
ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue