mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
Eliminate race condition where many callers would check SOP.PhysicsActor != null then assume it was still not null in later code.
Another thread could come and turn off physics for a part (null PhysicsActor) at any point. Had to turn off localCopy on warp3D CoreModules section in prebuild.xml since on current nant this copies all DLLs in bin/ which can be a very large number with compiled DLLs No obvious reason for doing that copy - nothing else does it.
This commit is contained in:
@@ -306,7 +306,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (rot != null)
|
||||
sceneObject.UpdateGroupRotationR((Quaternion)rot);
|
||||
|
||||
if (sceneObject.RootPart.PhysActor != null && sceneObject.RootPart.PhysActor.IsPhysical && vel != Vector3.Zero)
|
||||
PhysicsActor pa = sceneObject.RootPart.PhysActor;
|
||||
if (pa != null && pa.IsPhysical && vel != Vector3.Zero)
|
||||
{
|
||||
sceneObject.RootPart.ApplyImpulse((vel * sceneObject.GetMass()), false);
|
||||
sceneObject.Velocity = vel;
|
||||
|
||||
Reference in New Issue
Block a user